adamskristy / test-api-starter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Express Testing Lab Starter

Installation

  1. Clone this repository to your labs folder and change directory into it.
  2. Run npm i to download required dependencies.
  3. Create a .env file and add your DATABASE_URL to it with your MongoDB Atlas connection string:
DATABASE_URL=mongodb+srv://dbuser:dfsasdt3qfvs@cluster0.scylw.mongodb.net/gaphyTestingLab?retryWrites=true&w=majority

Getting Started

  1. Run node db/seed.js to populate your database with seed data if you want.
  2. 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:gm1W3HMJ3L3tvVxx@cluster0.scylw.mongodb.net/gaphy?retryWrites=true&w=majority
✅ mongo connection made!

Happy coding!!!

About


Languages

Language:JavaScript 100.0%