- Node.js
- node version >=
4
and npm version >=3
- node version >=
- Bower
- install using
npm install -g bower
- install using
- MongoDB
- Mongo version >=
3.2
- Mongo version >=
- Start the MongoDB server in default port
27017
and create a database calledgeolocator
- run
npm install
to fetch all node dependencies - run
bower install
to fetch all bower dependencies - run
node server.js
to start the server - navigate to
http://localhost:9090
to see the index.html
mongoimport.exe -d geolocator -c Company --type csv --file <project-location>\company.csv --headerline
eg: mongoimport.exe -d geolocator -c Company --type csv --file C:\Projects\csnes\cses_geolocator\company.csv --headerline
All operations are defined at file routes.js
/api/company/all
- POST - Fetch all companies or returns lists according to the given search criteria/api/company/:cid
- GET - Get a company by its id/api/company/add
- POST - Adds a new company to the database/api/company/edit
- POST - Edits existing information about a company/api/company/remove/:cid
- POST - Removes a company identified by the given id (cid
) from database