Getting Started With EmberJs (Beginners)

Giovanni
Mettle Adventures
Published in
2 min readJan 5, 2018

Setting up ember is super simple! All you need to do is install a couple of packages and your ready to go. At the time of writing this article, that latest version of Ember is 2.18.0.

I will assume you are a beginner, and your using a Mac. However, the same process applies on Windows.

Packages

First you will need to install a two packages onto your machine:

1. Node

Node.js® is a JavaScript runtime built on Chrome’s V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js’ package ecosystem, npm, is the largest ecosystem of open source libraries in the world. — https://nodejs.org/en/

You can download Node.js here. All you need to do is download the installer and follow the on screen instructions. If you get stuck you can get help here

2. Bower

Web sites are made of lots of things — frameworks, libraries, assets, and utilities. Bower manages all these things for you. — https://bower.io/

In ember you may want to install bower components, to do this you will need to make sure you have Bower installed. You install Bower via NPM (Node Package Manager) which comes with Node. Go to your terminal and type in:

npm install -g bower

Installing Ember CLI

Now we are ready to install ember, using NPM type in the following command into your terminal:

npm install -g ember-cli

The -g command tells npm to install ember-cli globally. Npm will install the latest version of ember-cli. You may also want to install PhantomJS. PhantomJS is “headless WebKit scriptable with a JavaScript API.”

Create a New App in Ember

Now we can create your app, once again in your terminal type in the following:

ember new my-app
  • ‘ember’ is the framework
  • ‘new’ is the command
  • ‘my-app’ is the app name (You can change this)

To run the application, you go to the project directory in your terminal and call the serve command:

cd my-app
ember server
  • ‘cd’: change directory

Ember server sets up a local server and runs your ember project on port 4200. In your preferred web browser, go to http://localhost:4200 to see the results.

That’s it! You have built your first ember project. When creating future projects, you don’t need to install node, bower or ember. You simply run the ‘ember new’ command.

You can find out more information from the emberjs documentation — https://guides.emberjs.com/v2.18.0/getting-started/quick-start/

Need Help? Get in touch:
Portfolio | Github | StackOverflow | Twitter

--

--