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 clone
this repository, thencd
into it.- Copy
.env.example
to.env
and follow the instructions. This sets up all the necessary settings for the app.- For Github app and the
GITHUB
variables, checkout https://authjs.dev/getting-started/oauth-tutorial#2-configuring-oauth-provider
- For Github app and the
- Run
docker compose up
and 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 clone
this repository, thencd
into it.- Run
npm install
to install dependencies. - Create file
.env
from.env.example
and follow the instructions.- For Github app and the
GITHUB
variables, checkout https://authjs.dev/getting-started/oauth-tutorial#2-configuring-oauth-provider
- For Github app and the
npm run build
to build the server.npm run preview
to run the server you just built.npm run dev
to run the development server.node build
will 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.