Serves EJS templates and Markdown files as HTML. Everything else is written in TypeScript.
Everything is server-side rendered. Vite is only used to compile SCSS and browser-specific TypeScript files.
- TypeScript
- HapiJS Server-side rendering
- EJS templates
- Markdown files
- SCSS
- Live reload using Hapi / Nes
- Type everything, absolutely everything.
- Documentation is a first-class citizen (comment your code).
- Keep the server as simple as possible.
- Keep the client as simple as possible.
- Social environment: think about the people who will be working on this project after you.
Prerequisites:
# Node 20 is required
nvm install 20
nvm use 20
# PNPM is our package manager
corepack enable
corepack install pnpm
Install:
pnpm install
Start developing:
pnpm watch
-
src/client
- Vite generated CSS and JS files to be run in the browser
- SCSS files
- Frontend TypeScript files
-
src/server
- Server TypeScript files
index.ts
is the entry pointmethods
are where you add universal server methodsroutes
are where you add server routesplugins
are where you add and configure server pluginshelpers
are where you add helper and utility functions
-
src/views
- EJS templates, partials, and layouts
-
src/docs
- Markdown files to be served as HTML