Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Ember.js require a server?

Tags:

ember.js

I've downloaded Ember.js ver 1.13.13 for a test drive. With other js frameworks, I am able to run from a file system. Does Ember require a server? I could not run directly from a file system. I did find some old tutorials that allows this. Is this a new thing?

like image 962
Chong Yu Avatar asked May 26 '26 09:05

Chong Yu


1 Answers

You are using Ember-CLI which requires running ember serve in order to view your ember app. Ember-CLI uses conventions so that it knows where to locate the files that compose your ember app. As Ember-CLI locates your files, it knows how to combine them in a manner that ultimately results in the single JavaScript file that is executed in your browser. In theory you could use the globals style of development-which is the style reflected in the 'old tutorials' that you reference-and run the app directly without using any sort of "server." But, I don't recommend that. Learning Ember-CLI is useful as it is the preferred method of development moving forward. And, in my opinion, gives you a number of features that allow you to more quickly prototype apps. You can read more about that in the link I provided to the Ember-CLI website.

like image 66
Oren Hizkiya Avatar answered May 30 '26 13:05

Oren Hizkiya