【发布时间】:2019-02-20 00:02:05
【问题描述】:
我正在 Azure 上部署 Node.js Express 应用程序,但该应用程序无法加载静态 css/js 文件。静态文件在我的 localhost:3000 下工作正常。但是在 Azure 上运行时,它会抛出 Internal Server Error 500。
我的 chrome 中的错误如下所示:
GET https:///resources/css/style.css net::ERR_ABORTED 500(内部服务器错误)。这个css文件的目录树是/public/resources/css
我假设我的静态文件路径是正确的,否则我会看到 404 错误而不是 500
app.use(express.static(path.join(__dirname, 'public')));
【问题讨论】:
标签: node.js azure express azure-web-app-service