语法错误:AngularJS中的替换控制器后出现意外令牌<

时间:2019-02-04 01:21:58

标签: node.js angularjs

我使用Auth0示例的示例AngularJS。我需要重写此示例并将controllers js文件替换为一个文件夹-controllers。但是这样做之后,我得到一个错误:语法错误:意外的令牌< 我发现这可能是服务器问题 节点上的服务器配置。 js是:

const express = require('express');
const app = express();
const path = require('path');

app.use('/', express.static(__dirname +  '/'));


app.get('/*', function(req, res) {
  res.sendFile(path.join(__dirname + '/index.html'));
});

const hostname = '0.0.0.0';
const port = 3000;

const server = app.listen(port, hostname, () => {
  console.log(`Server running at http://${hostname}:${port}/`);  
});

这台服务器有什么问题?谢谢。

0 个答案:

没有答案