One of the api for watchlist
Name | Description |
---|---|
src | Source files of the server |
src/public | Static files to be used on client side |
src/models | Storing and retrieving datails from different schema, not using mongoose models |
src/controllers | Controllers define functions that respond to various http requests |
src/server.ts | Entry point for the app |
src/util/ | helpers - logging, cache, ratelimit, database |
test | Test cases to perform before taking a new build, is also used in combination with github actions before merging the code to master branch |
views | Template files for rendering dynamic content to client side, since this is a api server, there is not much there in this folder. |
.env.example | Project secrets, usernames, passwords, etc. |
.github | CI - github actions - run test cases on pull request and report if it is safe to merge. |
.vscode | vs-code workspace configuration, higly recommend using vs-code (install prettier es-lint plugin) |
cache | Cache folder for responses that do not need to connect to database all the time. |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
nvm install node
yum install redis
systemctl enable redis
vim /etc/redis.conf
# change bind-address, password
systemctl start redis
redis-cli
apt or yum install nginx
npm install yarn --g
yarn build
yarn test
yarn add pm2 -G
yarn pm2 start build/server.js
- location
- ssl
- proxy
- typescript
- express
- jwt
- jest
- supertest
- handlebars
- node
- pm2
- mongodb
- redis
- nginx
- github actions
preferred mongoclient-native-driver for perfomance over mongoose odm.