Hardware, programming and astronomy tutorials and reviews.

Ember application structure

How does an ember.js application looks like?

Ember.js applications are divided into multiple files and folders. All of which makes sense when we get to know what is where, so lets take a look on Ember application structure.

ember-cli guide has a deep walk-through on each application element. I'll cover the most important parts:

Development server compiles the application on the fly. For production we can build a complete application with:

ember build --environment="production"

This will create a stand-alone production version in dist folder. Ember application assumes that it will be run in default path (root path /). If you want to run your ember application in a subfolder/different path then you have to specify it in the configuration before building (config/environment.js):

  if (environment === 'production') {
    ENV.baseURL = '/some/path/here/';

The Welcome to Ember text is located in app/templates/application.hbs template - a htmlbars template. To create new pages and other elements within ember application we will use ember-cli, but that's in the next tutorial. You can change the text now and check if watchman will reload that page open in the browser.


15 November 2015;

Comment article