Building with ember CLI in production environment

∥☆過路亽.° 提交于 2019-12-01 18:05:47

问题


Running ember server works fine locally on my dev machine but how do I do it on my host? All I can do is upload the dist folder which contains the output of the CLI build. But when I navigate to it there is a blank page.


回答1:


Ember serve/server/s fires up a server for local development, you shouldn't use it's files to deploy on a live host.

Starts up the server. Default port is 4200. Use --proxy flag to proxy all ajax requests to the given address. For example ember server --proxy http://127.0.0.1:8080 will proxy all your apps XHR to your server running at port 8080.

When you want to deploy you will need to build your files in order to concat/min/uglify for that you will need to run ember build --environment production change the env depending on your needs.

Builds the application depending on the environment.

To learn more about ember-cli commands refer to this section of the docs.



来源:https://stackoverflow.com/questions/26792071/building-with-ember-cli-in-production-environment

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!