- Clone this repository to your labs folder and change directory into it.
- Run
npm i
to download required dependencies. - Create a
.env
file and add yourDATABASE_URL
to it with your MongoDB Atlas connection string:
DATABASE_URL=mongodb+srv://dbuser:[email protected]/gaphyTestingLab?retryWrites=true&w=majority
- Run
node db/seed.js
to populate your database with seed data if you want. - Run
nodemon index.js
to start your development server. You should see the following:
[nodemon] starting `node index.js`
Hello world! Express GAphy API listening on port 3000
mongo connected at: mongodb+srv://dbuser:[email protected]/gaphy?retryWrites=true&w=majority
โ
mongo connection made!
Happy coding!!!