"# NodeJSDemo" This is simple demo of making Web APIs using NodeJS and MongoDB. To run this demo first install NodeJS and MongoDB from below links:
NodeJS: https://nodejs.org/en/download/
MongoDB: https://www.mongodb.com/download-center#community
To ensure Node.js has been installed, run
node -v
in your terminal - you should get something like v6.9.5 Update your version of npm with
npm install npm --global
This requires Administrator privileges, and you may need to authenticate Congratulations - you've now got Node.js installed, and are ready to start building!
Connecting to MongoDB using node.js Now for the fun part: In order to connect to a MongoDB-server, you need a database driver, which defaults to node-mongodb-native. Fire up your command prompt again, switch to your node.js app folder and install it using below command:
npm install mongodb
once it's all Done you are ready to run this demo: open command prompt and move to working directory then run following command:
node server.js
We are live on 8000
You will get response like this !! That's all done.