Aug 20, 2014
MongoDB as Database, ExpressJS for routing and HTTP server, All logic on beckend in Node.js, and AngularJS on front end to Handle REST APIs and Client side routing.
In this post we are going to write the beck-end part for a simple MEAN stack app, REST APIs to handle data.
Pandas in bamboo farm
InstallationYou must have MongoDB and NodeJS installted on your server.
git clone https://github.com/motyar/rest_api_mean cd rest_api_mean npm install node server.js
Nothing but (cute) PandasGET /api/pandas to get all the pandas.
GET /api/pandas/panda_id to get that panda's info
POST /api/pandas to add new panda
DELETE /api/pandas/panda_id to remove that one panda.
PUT /api/pandas/panda_id to update details
ToolsYou can use HurlIt to test REST APIs.
Whats next?Stay tuned, we will be working on front end of this app, using AngularJS.
If anything helps, feel free to buy me a beer.
By : Motyar+ @motyar