Built with Express
, Node.JS
, using Typescript
Install latest Node.js
from here
Install latest MongoDB
from here
Start the MongoDB
using command
mongod
On macOS, you can install a mongdb GUI client using
brew cask install mongodb
On linux, you should run MongoDB
as a service
vi /etc/systemd/system/mongo.service
Then enter the following:
[Unit]
Description=Mongo DB
After=network.target
[Service]
Type=simple
User=your_user_name
ExecStart=/usr/bin/mongod
Restart=on-failure
[Install]
WantedBy=multi-user.target
On windows
create a .env
file in project directory, with content like this:
you can change it to whatever port you prefer
PORT = 7777
SECRET = 'SOME_RANDOM_STRING'
JWT_EXPIRATION_MS = 259200000
MONGODB_CONNECT_STRING = 'mongodb://127.0.0.1:27017/shuttle'
Install the dependencies using:
yarn install
or
npm install
Enter the project directory and
yarn dev
or
npm start
or
npm run dev
Enter the project directory and
yarn prod
or
npm run prod
You need eslint installed globally
yarn lint
or
npm run lint
if you are using Visual Studio Code
Go to Settings-> Debug: Node: Auto Attach
, Set it to be On
And then
yarn debug
or
npm debug
You need jest installed globally
yarn test
or
npm test