Auto create break service in node.js

Is there a way to automatically create a Rest service in node.js, for example in rails? I just want to expose Mongolian models as a Restfull service. Now I am doing a lot of repetitive work with Mongoose and express-resource.

+3
source share
2 answers

Perhaps follow these commands:

npm install railway
railway init rest-app && cd rest-app && npm install
railway generate scaffold resource property1 property2
railway server 3000

What is it! If you need to create a nested resource:

railway generate resource.nestedresource propertyForNestedResource

and change config / routes.js:

map.resources('resource', function (res) {
    res.resources('nestedresources');
});

This example shows the application: https://github.com/anatoliychakkaev/railway-example-app

Welcome to the railway: http://railwayjs.com

+1
source

, , :

https://github.com/enyo/mongo-rest

, , REST mongoose.

+2

All Articles