Building with ember CLI in production environment

前端 未结 1 998
深忆病人
深忆病人 2021-01-18 18:35

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. B

相关标签:
1条回答
  • 2021-01-18 19:24

    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.

    0 讨论(0)
提交回复
热议问题