-
Notifications
You must be signed in to change notification settings - Fork 0
Getting started
Kurtis Reid edited this page Aug 31, 2016
·
6 revisions
This API uses the following things:
- nodejs and npm
- express framework
npm install express --save
-
MongoDB database
- note: one must create a the file path
data\dbin their C:\
- note: one must create a the file path
-
Nodejs driver for mongoDB
npm install mongodb
npm install body-parser
There are several things that need to be adjusted:
- variable
urlmust be adjusted to the correct port that the mongoDB instance is running on. more info - variable
collectmust be adjusted to the correct collection that the documents will be stored in.
(Please note: database is not working) Once everything has been correctly installed, one must do several things: To run the database, navigate to the file the mongoDB file was installed to: (most often in "c:\Program Files\MongoDB\Server\3.2\bin)
mongod.exe
#Running the API
Once the database is up and running, open up a seperate terminal, and navigate to the folder your server.js file is located.
Once there run the command:
node server.js
if everything was correctly installed, the terminal should look something like so:
Example app listening at http://:::8081
The API is now successfully running! (Unlike the Jeb Bush campaign)