添加帆路线路径为默认网址
我有一个使用帆框架node
服务器。
当我运行,它返回此消息:
info: To see your app, visit http://localhost:1337
info: To shut down Sails, press <CTRL> + C at any time.
可能的路由路径添加到默认的网址是什么?
相反http://localhost:1337
的,使用http://localhost:1337/test/
我试图用npm start sails lift --appPath=/test/
运行,但不会做任何事情。
如果你想Sails.js来测试你可以做一个新的视图动作(或使用view-homepage-or-redirect
如果你下载的应用程序),那么你可以设置在行动中提升到一个特定的页面
if (sails.config.environment !== 'production') {
throw {redirect:'/test'};
}
如果你最终使这个不要新动作忘了将它添加到您的routes.js