首页 文章

SailsJS无法访问位于assets / app中的index.html

提问于
浏览
0

Sails版本:v0.12.11节点版本:v6.6.0 NPM版本:v3.10.3操作系统:Windows 10

你好 . 我've just created a new sails app with sails new app --no-frontend. Now I need to import my reactjs app. I'已创建assets / app / index.html(在此http://sailsjs.com/documentation/concepts/assets之后)并尝试通过http://localhost:1337/app/index.html访问它,但每次我从网络选项卡中收到404错误 . 我应该在routes.js中手动添加一些东西吗?

1 回答

  • 1

    当使用--no-frontend创建应用程序时,没有grunt文件和任务 . 所以我的资产都不会由帆管理 . 我've manually created .tmp/public/app folder and put my index.html there. Now it works. I'已在此处找到解决方案Manually include assets in SailsJS 0.9.7

相关问题