小编Dor*_*ron的帖子

Yeoman发电机使用gulp和角度与快递服务器

我正在尝试使用带有generator-gulp-angular的yeoman建立一个MEAN堆栈web应用程序,它没有快速服务器.我试图添加快递,但我遇到了麻烦,.tmp文件夹中的索引html找不到任何bower_components文件夹项.有人有这种设置的工作示例吗?

我添加了快速服务器加载文件,其中包含:

app.use(express.static(path.join(rootPath, '/.tmp/serve')));
app.use(express.static(path.join(rootPath, '/bower_components')));
app.use(express.static(path.join(rootPath, '/src')));

app.get('/', function(req, res) {
    res.sendFile('/.tmp/serve/index.html');
});
Run Code Online (Sandbox Code Playgroud)

express angularjs yeoman gulp

3
推荐指数
1
解决办法
5400
查看次数

标签 统计

angularjs ×1

express ×1

gulp ×1

yeoman ×1