【发布时间】:2017-02-16 19:23:18
【问题描述】:
我有一个使用 nodejs 服务器 api 的 angular2 应用程序。 我使用 nd b 构建应用程序,它在 dist 文件夹中创建了文件。在哪里可以指定生产构建的生产 url,以便所有 css、js 文件正确加载。
另外,我是否需要 apache 服务器来托管这些构建。或者我可以使用节点服务器本身来托管它吗?
索引.html:
<!doctype html>
<html>
<head>
<base href="/">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Demo</title>
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="assets/styles/css/custom.css"/>
<script src="assets/vendor/pace/pace.js"></script>
</head>
<body>
<app-root>
<div class="loading"></div>
</app-root>
</body>
</html>
谢谢
【问题讨论】:
标签: javascript node.js angular