- Clone repo
npm installinside the repo foldernpm run watch-debug. This will build and run the server while watching any file changes you make. Use while developing.npm run build. This will build the server and place the Javascript output in thedistfolder. Only really used for production deployment.npm run serve. This will run the compiled server indist/server.js.
All database models go into the model folder (obviously). The Interfaces folder contain all the interfaces used in both the database models and throughout the code.
Any code that's pushed to the main branch is automatically built and deployed to https://server.clubito.me.
Pino is used as the logging library. In development, every request is logged and outputted to the console, but is silenced in production.
Import the logger object like this: import logger from "@logger"; at the top of every file. Then, use the appropriate logging level: debug -> info -> warn -> error, fatal.
I set up the compiler to resolve three paths to make life easier.
@logger resolves to src/util/logger
@models/* resolves to src/models/*
@secrets resolves to src/util/secrets
This is to prevent the whole ../../../ nonsense from different file levels. Please use this lol.