We’ll do this by coding a REST API that lets users interact with our Youtube database by defining what info our database will accept and how it goes about manipulating that data depending on what a user would like to do.
Details tutorial this
http://localhost:3000/subscribers = GET, POST,
http://localhost:3000/subscribers/:id = GET, PATCH, DELETE
Important Prerequisite: Make sure you already have MongoDB installed and setup on your machine before starting this tutorial. Here is a link to a guide that MongoDB provides on their website: MongoDB Installation
To get started with the app, clone the repo and then install the needed
Clone the repo
git clone git@github.com:NaofalMufid/ExpressPostgresApi.git
move to project directory
cd ExpressPostgresApi
install package
npm install
npm i --save-dev
create file .env type
DATABASE_URL=mongodb://localhost/subscribers
running mongo on terminal type
mongod
End with an example of getting some data out of the system or using it for a little demo.
node server.js
or
nodemon server.js