Description: Application to schedule coronavirus vaccine, proposed by Pitang Agile IT's Trainee Project
Project: COVID19
- Project linked to this repository based on Kanban cards with issues for each branch and linked pull requests
- You can see the timeline of the most recent commits to this repository and its network ordered by most recently pushed to, on Network Graph
I'm usign MongoDB database on Docker. If you already have it on your pc, perfect, you can jump to "Recommended Installation"
- Install Docker
- Open your terminal to create a local MongoDB server
- Run
docker volume create <volume_name>
to create a volume - Run
docker run -v <volume_name>:/data/db --name=<container_name> -p 27017:27017 -d mongo:5.0.6
to create a container from MongoDB official image - Run
docker exec -it <container_mongo_id> bash
to start a interactive session to be able to access MongoDB from the terminal - Now, inside the interactive session, you can run
mongo
to start MongoDB Shell - After clonning the repository on "Recommended Installation", you can see the database typing
show dbs;
use <database_name>
,show collections
anddb.<database_name>.find().preety
to get all document
I choosed Mongoose as a ORM (Object-Relational Mapper) for MongoDB. When
mongoose.connect(DATABASE_URL)
is invoked, the database is created if it doesn't exist
- Make sure you have Node.js and yarn installed
- Choose a directory on your pc to clone this repository
- Run
git clone git@github.com:thaisclxt/covid19-backend.git
on the choosed directory - Run
yarn install
to install dependencies - Create a
.env
file based on.env.example
- Run
yarn start
to start the app - Open http://localhost:5000 to view it in your browser or use Insomnia to have a better experience with HTTP requests, for example:
- Install MongoDB Database Tools
- Run
mongorestore --db <database_name> dump/covid19