我尝试在我的vps上部署我的项目。
这是我的server.js
var http = require('http'); var fs = require('fs'); var mime = require('mime');
var filename =“。/ index.html”;
http.createServer(function(req,res){
fs.readFile(filename, function(err, file) { if (err) { res.end("errore ci fu"); } res.writeHeader(200, { "Content-Type": require('mime').lookup(filename) }); res.write(file, 'binary'); res.end(); });
})听(5000);
console.log('运行于http://127.0.0.1:5000/'的服务器);
这是我的结构:
这是html文件:
<!DOCTYPE html>
<html ng-app="app">
<head>
<meta charset="utf-8" />
<title>AngularJS User Registration and Login Example</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" />
<link href="app-content/app.css" rel="stylesheet" />
</head>
<body>
<div class="jumbotron">
<div class="container">
<div class="col-sm-8 col-sm-offset-2">
<div ng-class="{ 'alert': flash, 'alert-success': flash.type === 'success', 'alert-danger': flash.type === 'error' }" ng-if="flash" ng-bind="flash.message"></div>
<div ng-view></div>
</div>
</div>
</div>
<div class="credits text-center">
<p>
<a href="http://jasonwatmore.com/post/2015/03/10/AngularJS-User-Registration-and-Login-Example.aspx">AngularJS User Registration and Login Example</a>
</p>
<p>
<a href="http://jasonwatmore.com">JasonWatmore.com</a>
</p>
</div>
<script src="//code.jquery.com/jquery-2.0.3.min.js"></script>
<script src="//code.angularjs.org/1.2.20/angular.js"></script>
<script src="//code.angularjs.org/1.2.20/angular-route.js"></script>
<script src="//code.angularjs.org/1.2.13/angular-cookies.js"></script>
<script src="app.js"></script>
<script src="app-services/authentication.service.js"></script>
<script src="app-services/flash.service.js"></script>
<script src="app-services/user.service.local-storage.js"></script>
<script src="home/home.controller.js"></script>
<script src="login/login.controller.js"></script>
<script src="register/register.controller.js"></script>
</body>
</html>
当我尝试运行应用程序时,我在浏览器上键入正确的地址,响应是一个错误,因为它不能下载角度js,也可能还有其他依赖项。
这是我浏览器的结果:
为什么它不下载依赖项?????
我请求你的帮助!!
由于