Code samples used in this book

Now that we have got a good introduction to Ember.js with Ember CLI, let's see how can you access and run the code samples used in this book. You can find all the code samples of this book on GitHub at https://github.com/suchitpuri/emberjs-essentials.

Note

Previous knowledge of using the Git distributed version control system is required to clone and fork the repository. To learn more about Git, please refer to http://git-scm.com/book/en/v2/Getting-Started-Git-Basics or https://try.github.io/levels/1/challenges/1.

There is a separate folder for every chapter inside the emberjs-essentials repository. Inside every chapter, you will find examples for that chapter. Each example is a separate Ember CLI project.

In order to clone and run an example from the GitHub repository, please run the following command at the location where you want to check out the emberjs-essentials repository:

git clone [email protected]:suchitpuri/emberjs-essentials.git

After this, you will find the code for the book being checked out inside the emberjs-essentials directory.

You will need to install Ember CLI on your machine to run the code examples of this book. To install and understand Ember CLI, please refer to the Prerequisites section, inside Setting up your first Ember.js application using Ember CLI.

Once Ember CLI and its dependencies are installed, navigate to the example you want to run, and run the ember install command:

cd emberjs-essentials/chapter-2/example1/
ember install

ember install will install the dependencies of the project by running bower install and npm install.

To start the development server here, run the following command:

ember server

This should start the development server at http://localhost:4200/.

Now you can open the above location in the browser of your choice and see your example.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.80.101