Sta*_*tan 5 javascript routes nested-routes sails.js
我的Sails.js有API,我想将所有路由都包装在中v1。可能吗?
这是我尝试过的方法,但是不起作用。
routes.js
'use strict';
module.exports.routes = {
'/v1': { //
'get /cron': 'CronController.start' // THIS DOES NOT WORK
}, //
'get /cron': 'CronController.start' // this works
};
Run Code Online (Sandbox Code Playgroud)