我想构建我的Angular 2前端并将其部署到Tomcat应用程序服务器.为了开始,我完全按照以下介绍的步骤进行操作:https://angular.io/docs/ts/latest/guide/webpack.html.
所以我有以下项目结构(所有文件都与上面提到的引言完全相同):
angular2-webpack
--- config
------- helpers.js
------- karma.conf.js
------- karma-test-shim.js
------- webpack.common.js
------- webpack.dev.js
------- webpack.prod.js
------- webpack.test.js
--- dist
--- node_modules
- --public
------- css
-------------- styles.css
------- images
-------------- angular.png
--- src
------- app
-------------- app.component.css
-------------- app. component.html
-------------- app.component.spec.ts
-------------- app.component.ts
------- ------- app.module.ts
------- index.html
------- main.ts
------- polyfills.ts
------- vendor .ts
---
typings --- karma.conf.js
--- package.json
--- tsconfig.json
--- typings.json
--- webpack.config.js
npm分别webpack-dev-server --inline --progress …
我是AngularJS 2框架的新手,我被卡住了!
我想在Windows Server 2012上部署应用程序(例如快速入门).我已经在其上安装了Apache tomcat.我做了什么:我使用命令npm build(有和没有"-prod")来生成dist文件夹(输出:index.html和bundle文件)然后我把它放到tomcat的'webapps'文件夹中,然后我试图使用我的浏览器访问该页面,索引页面显示"正在加载..."!我认为棱角分明不起作用......
我尝试在服务器上安装NodeJ然后生成一个简单的项目(npm install -g angular-cli)并在服务器上运行..它可以在localhost(服务器)上工作但在我的机器上使用"IP_of_sv:Port"Chrome给出我错了"ERR_CONNECTION_REFUSED"!
请帮我解释一下,请简单解释一下吗?
先感谢您!