Architecture - https://www.mindmeister.com/map/2355617550?t=6BIg5PyPWI Trello - https://trello.com/b/hDbViME0/archery-contest Git - https://github.com/frontbastard/archery-contest
- MondoDB
- Download - https://www.mongodb.com/try/download/community
- Extract, rename folder to just
mongodb
and place it in a convenient location - Create a folder next to it and name it
mongodb-data
- In the terminal run the command
<PATH_TO_FOLDER>/mongodb/bin/mongod --dbpath=<PATH_TO_FOLDER>/mongodb-data
(replace<PATH_TO_FOLDER>
with the current path)
- Studio 3T
- Download - https://studio3t.com/download/
- Install
- Connect with defaults (localhost:27017)
- Postman
- Download - https://www.postman.com/downloads/
- Import
/Archery Contest.postman_collection.json
- Archery Contest Backend
- Clone - https://github.com/frontbastard/archery-contest-backend
- create a
/.config/dev.env
file with such content:
NODE_ENV='development'
PORT=3000
SENDGRID_API_KEY=''
MONGODB_URL='mongodb://127.0.0.1:27017/archery-contest-api'
JWT_SECRET='ABCD1234a' // any symbols
- npm i
- npm run dev
- Create master user
- Create user in Postman -
User -> Create User
- Make it master if needed. In Studio 3T double click on
localhost:27017 -> archery-contest-api -> Collections -> users
, changerole
value to1
- Add JWT token to the client
- Create file
token.ts
in the src/app/core/interceptors/ folder with code:
const token = {
master: 'PLACE_TOKEN_HERE',
moderator: '',
user: '',
};
export const jwtToken = token.master;
git checkout dev
npm i
ng serve
- Open
localhost:4200