# Building For Production

**URL:** <https://discuss.emberjs.com/t/building-for-production/11650>\
**Category:** Learning Team\
**Created:** [September 25, 2016, 5:01pm UTC](https://discuss.emberjs.com/t/building-for-production/11650 "2016-09-25T17:01:03Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![lamamasters](https://avatars.discourse-cdn.com/v4/letter/l/9e8a1a/32.png) [@lamamasters](https://discuss.emberjs.com/u/lamamasters)\
**Post date:** [September 25, 2016, 5:01pm UTC](https://discuss.emberjs.com/t/building-for-production/11650/1 "2016-09-25T17:01:03Z")

</div>

Hello, I am just **beginning** with javascript frameworks and I have 2 questions.

* * *

**1).** After calling the `ember build --env production`, the system generates the files in the `dist/` folder.

**But how can I use them on my website??**

After calling the **index.html** file (from “dist /”), **I do not see anything on the screen** (on the server localhost: 4200 result is correct).

* * *

2). What keeps the backend of this forum? PHP, .NET?

* * *

I ask for your understanding and support. L

---

<div class="post-metadata">

**Author:** ![maffews](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/maffews/32/12606_2.png) [@maffews](https://discuss.emberjs.com/u/maffews)\
**Post date:** [September 26, 2016, 4:43am UTC](https://discuss.emberjs.com/t/building-for-production/11650/2 "2016-09-26T04:43:41Z")

</div>

Are you loading index.html via http(s)? If not, that’s probably the issue. You will need a webserver to serve index.html. You can view use your browser’s [javascript console](https://developers.google.com/web/tools/chrome-devtools/debug/console/?hl=en) to view relevant errors. If you report them back here they will help with debugging.

The forum is a [Discourse](https://github.com/discourse/discourse) instance, which is powered by Ruby.

---

<div class="post-metadata">

**Author:** ![broerse](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/broerse/32/9497_2.png) [@broerse](https://discuss.emberjs.com/u/broerse)\
**Post date:** [September 26, 2016, 9:09am UTC](https://discuss.emberjs.com/t/building-for-production/11650/3 "2016-09-26T09:09:23Z")

</div>

If your website is running Apache add this to your public folder:

[https://github.com/broerse/ember-cli-blog/blob/21b6db2f7c520244602624a0df3ae80f4f2b10ed/public/.htaccess](https://github.com/broerse/ember-cli-blog/blob/21b6db2f7c520244602624a0df3ae80f4f2b10ed/public/.htaccess)

What is your backend?

---

<div class="post-metadata">

**Author:** ![broerse](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/broerse/32/9497_2.png) [@broerse](https://discuss.emberjs.com/u/broerse)\
**Post date:** [September 26, 2016, 9:43am UTC](https://discuss.emberjs.com/t/building-for-production/11650/5 "2016-09-26T09:43:27Z")

</div>

To also answer point 1)

`npm install -g http-server`

Go to the dist folder and type:

`http-server`

Then go to `http://localhost:8080/` to see your App.

---

<div class="post-metadata">

**Author:** ![locks](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/locks/32/3878_2.png) [@locks](https://discuss.emberjs.com/u/locks)\
**Post date:** [September 26, 2016, 10:53am UTC](https://discuss.emberjs.com/t/building-for-production/11650/6 "2016-09-26T10:53:19Z")

</div>

Alternative if you have Python in your system:

```
python -m SimpleHTTPServer

```

---

<div class="post-metadata">

**Author:** ![lamamasters](https://avatars.discourse-cdn.com/v4/letter/l/9e8a1a/32.png) [@lamamasters](https://discuss.emberjs.com/u/lamamasters)\
**Post date:** [September 26, 2016, 2:22pm UTC](https://discuss.emberjs.com/t/building-for-production/11650/7 "2016-09-26T14:22:33Z")

</div>

**Thank you all for your reply!**

* * *

To view the contents of the `dist/` folder, I used web server based on Apache (local and real). With **.htaccess** file (as in php frameworks): RewriteEngine On RewriteCond% {REQUEST\_FILENAME}! -f RewriteCond% {REQUEST\_FILENAME}! -d RewriteRule ^ (. \*) $ index.html [QSA, L]

* * *

Unfortunately, after the change: RewriteEngine On RewriteRule ^ index \ .html $ - [L] RewriteCond% {REQUEST\_FILENAME}! -f RewriteCond% {REQUEST\_FILENAME}! -d RewriteRule (. \*) index.html [L] \</ IfModule\>

**I still do not see anything on the screen** (under ember server everything is ok).

* * *

**I try to run this example:** [Quick Start](https://guides.emberjs.com/v2.8.0/getting-started/quick-start/)

and getting these files on `dist/`: [Zip file from tinyupload.com](http://s000.tinyupload.com/?file_id=45798931903526029171)

* * *

Apart from instructions in the **Getting Started** , I have to do something else?

Thanks. L

---

<div class="post-metadata">

**Author:** ![maffews](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/maffews/32/12606_2.png) [@maffews](https://discuss.emberjs.com/u/maffews)\
**Post date:** [September 26, 2016, 6:31pm UTC](https://discuss.emberjs.com/t/building-for-production/11650/8 "2016-09-26T18:31:06Z")

</div>

What errors do you see in your browser’s [javascript console](https://developers.google.com/web/tools/chrome-devtools/debug/console/?hl=en)?

---

<div class="post-metadata">

**Author:** ![lamamasters](https://avatars.discourse-cdn.com/v4/letter/l/9e8a1a/32.png) [@lamamasters](https://discuss.emberjs.com/u/lamamasters)\
**Post date:** [September 26, 2016, 8:25pm UTC](https://discuss.emberjs.com/t/building-for-production/11650/9 "2016-09-26T20:25:07Z")

</div>

Javascript Error: `Uncaught UnrecognizedURLError: /dl/`

**“dl”** is a folder that contains the files from the `dist/`

L

---

<div class="post-metadata">

**Author:** ![broerse](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/broerse/32/9497_2.png) [@broerse](https://discuss.emberjs.com/u/broerse)\
**Post date:** [September 27, 2016, 6:24am UTC](https://discuss.emberjs.com/t/building-for-production/11650/10 "2016-09-27T06:24:11Z")

</div>

Change `ENV.baseURL` (from Ember 2.7 use `ENV.rootURL`) for production like this to `/dl/`[https://github.com/broerse/ember-cli-blog/blob/ebc37bb2d0dfe2537ef5a3a90e2124c237f8cd60/config/environment.js#L46](https://github.com/broerse/ember-cli-blog/blob/ebc37bb2d0dfe2537ef5a3a90e2124c237f8cd60/config/environment.js#L46)

---

<div class="post-metadata">

**Author:** ![lamamasters](https://avatars.discourse-cdn.com/v4/letter/l/9e8a1a/32.png) [@lamamasters](https://discuss.emberjs.com/u/lamamasters)\
**Post date:** [September 27, 2016, 7:33am UTC](https://discuss.emberjs.com/t/building-for-production/11650/11 "2016-09-27T07:33:07Z")

</div>

Mr. **broerse** , that was it! 🙂

**Thank you all** for your help and understanding.

L
