0
votes

I am working on developing a client-side application built on EmberJS.

Now, while I test the code in the browser ultimately, I have the following locally for development;

  1. NodeJS & NPM
  2. I have defined bower.json & package.json
  3. I use ember-cli & do ember build & ember server to start the local server
  4. I hit the URL http://localhost:4200 in the browser to access the app

Now my question is I wanted to understand, what exactly is happening here ? Meaning what exactly happens before code runs in the browser.

I understand when the build happens, it actually pushes code into the 'dist' directory.

Is there any role in NodeJS in all of this (meaning any JS run on server-side in the background) OR we just utilize npm/bower for this case ?

So I just wanted to connect all the dots regarding running in the browser.

1

1 Answers

1
votes

browsers don't support the features of modern javascript, so when you end up deploying your ember site, you only need to deploy static files (from the dist directory), and you actually don't need a server at all.

This is how https://emberclear.io works (no server, just a CDN).

The NodeJS things are purely for pre-deployment needs (development, transpiling, testing, etc).

Hope this helps.