/apiRest-mongodb

A basic restfull-api using mongodb server

Primary LanguageJavaScript

How does it works this Node.js project?

This project was made to understand http requests , put , delete, get and post. this project is working with mongodb. we recomend use postman or insomia to prove the apis. next we provide you the commands to install all dependencies

To install all dependencies in package.json type the following command

$ npm install

command to run the rest api using a npm command configured in package.json

$ npm start

Bonus

To install mongo db in mac os with Homebrew.

$ brew update

After updating Homebrew.

$ brew install mongodb

create the “db” directory. This is where the Mongo data files will live. You can create the directory in the default location by running but you should be root user before to run this command.

$ mkdir -p /data/db

Make sure that the /data/db directory has the right permissions by running.

$ sudo chown -R `id -un` /data/db