简体   繁体   中英

how can i make restful API in nodejs?

I want to create restful API in nodejs for my android application.But after watching so many videos and different patterns i'm bit confuse.Can anone guide me and show the complete roadmap to create APIs and how to deploy nodejs APIs on online server with mongoDB database. Please help me out!

The best way to create restful APIs is using express , they have great documentation and a begginner friendly starting guide . After you have a bit of experience with it the mongodb library to go is mongoose and they also have a starting guide . To learn how to combine and create a API with these I found a nice guide here .

As Alex answered the question on how to build a Restful API and communicate with a mongoDB database, I will explain how to deploy the application online. I would have done it in the comment section under Alex's post if only I had enough reputation.

If your looking for a free solution, have a look at Heroku which is really easy to use. They have a starting guide as well to help you push your code online.

Heroku works with add-ons that can be plugged to your application. Every applications can be provided with add-ons, such as a database, to extend its functionalities. I suggest the mLab MongoDB add-on which propose a free plan.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM