Demo prerendered site running at https://eggrror404.github.io/tnfshcec-web
Using docker-compose will be the easier way to build the web server.
git clonethis repository, thencdinto it.- Copy
.env.exampleto.envand follow the instructions. This sets up all the necessary settings for the app.- For Github app and the
GITHUBvariables, checkout https://authjs.dev/getting-started/oauth-tutorial#2-configuring-oauth-provider
- For Github app and the
- Run
docker compose upand Docker should take care of the rest.
The default SvelteKit server is only http, which means authentication would not work as it needs https. Using a reverse proxy can probably be the fix for now.
- Make sure Node.js and npm are installed.
git clonethis repository, thencdinto it.- Run
npm installto install dependencies. - Create file
.envfrom.env.exampleand follow the instructions.- For Github app and the
GITHUBvariables, checkout https://authjs.dev/getting-started/oauth-tutorial#2-configuring-oauth-provider
- For Github app and the
npm run buildto build the server.npm run previewto run the server you just built.npm run devto run the development server.node buildwill start a NodeJS server built, currently unable to handle https.
Posts are stored in the cec/ folder, as markdown files.
The server reads the file everytime it's requested,
and offers adding, editing, and deleting posts for admin users.
Post route in the url is directly mapped to the filesystem, eg:
https://<domain>/post/path/to/post -> cec/path/to/post.md
Prerendering is enabled through the PRERENDER environment variable.
Note that AUTH_SECRET and AUTH_TRUST_HOST variables needs to be set
for Auth.js to load correctly.
(Even though auth doesn't work with prerendering.)
Currently prerender is set up with Github Actions, to build on push events.