Giter VIP home page Giter VIP logo

tnfshcec-web's Introduction

tnfshcec-web

Demo prerendered site running at https://eggrror404.github.io/tnfshcec-web

How to build

Using Docker Compose

Using docker-compose will be the easier way to build the web server.

  1. git clone this repository, then cd into it.
  2. Copy .env.example to .env and follow the instructions. This sets up all the necessary settings for the app.
  3. 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.

Manually building

  1. Make sure Node.js and npm are installed.
  2. git clone this repository, then cd into it.
  3. Run npm install to install dependencies.
  4. Create file .env from .env.example and follow the instructions.
  5. npm run build to build the server.
  6. 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.

Usage

The post system

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

Prerender

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.

tnfshcec-web's People

Contributors

eggrror404 avatar heyloon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.