Built with Express, Node.JS, using Typescript
Install latest Node.js from here
Install latest MongoDB from here
Start the MongoDB using command
mongodOn macOS, you can install a mongdb GUI client using
brew cask install mongodbOn linux, you should run MongoDB as a service
vi /etc/systemd/system/mongo.serviceThen 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 installor
npm installEnter the project directory and
yarn devor
npm startor
npm run devEnter the project directory and
yarn prodor
npm run prodYou need eslint installed globally
yarn lintor
npm run lintif you are using Visual Studio Code
Go to Settings-> Debug: Node: Auto Attach, Set it to be On
And then
yarn debugor
npm debugYou need jest installed globally
yarn testor
npm test