MongoDB, Express, Node API to enter, query and manipulate user data.
First, install MongoDB
Then, start server
$ mongod
connect, so we can create a user.
$ mongo --port 27017
> use admin
> db.createUser(
> {
> user: "user",
> pwd: "userpassword123",
> roles: [ { role: "readWrite", db: "test" } ]
> }
> )
Stop server (CTRL-C/CMD-C) to restart with authentication flag
$ mongod --auth
Connect with new user, via another terminal window
$ mongo --port 27017 -u "user" -p "userpassword123" --authenticationDatabase "admin"
$ cd
$ git clone https://github.com/ka1ne/men-api.git
$ cd men-api
$ node app.js