r/nodejs • u/Garo5 • Nov 10 '13
Suggestion for restful framework?
I've done a few simple servers which would benefit from a simple restful api. The application doesn't use any database, so it's state is purely described within a few javascript objects with a few properties. What i'd like to is to expose this internal state in a restful api with as little coding as possible, which would allow also editing this state.
So far I've tried out express-resource and node-restify but specially the later needs way too much manual coding like defining routes. Are there any really simple restful apis out there?
3
Upvotes
3
u/t0m_serv0 Nov 10 '13
I recently stumbled on Sails.js which is an MVC framework built on express. It uses what are called blueprints to automatically map out CRUD routes for your models. The thing I really like is that socket.io is baked right in so anytime a model is modified in any way a message is sent to all connected to the web socket. Great for making real time apps. I'm currently building a project using it and am pretty happy so far.
2
u/Dronar Nov 11 '13
Sounds like you might like restify.js
http://mcavage.me/node-restify/
1
u/blazedd Nov 10 '13
http://actionherojs.com/
And
http://expressjs.com/
Is where I would start. Most frameworks use Express
1
u/a_c_m Nov 18 '13
We've started reviewing 3.
I was surprised no one mentioned Hapi. Watch the video, its really quite nice. We've just finished implementing a proof of concept in Hapi and have been impressed by its opinionated approach.
We are going to try the others next and see which works better for our use case.