> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Installing Ember.js on managed hosting accounts

> Discover how to install Ember.js on managed hosting for building single-page applications with this concise guide.

This article describes how to install [Ember.js](http://emberjs.com) on a managed hosting account.

Ember.js is a client-side JavaScript web application framework used to create [single-page applications](https://en.wikipedia.org/wiki/Single-page_application). Ember.js is based on the model-view-controller (MVC) architecture and includes support for automatically updating templates, application state management, and much more.

## Step 1: Install Node.js and npm

Ember.js runs on top of Node.js, so the first step is to install Node.js and npm (the Node.js package manager) on your account. For step-by-step instructions about how to do this, please see [this article](/docs/installing-and-configuring-nodejs-on-managed-hosting).

## Step 2: Install Ember.js

After you install Node.js on your account, you are ready to install Ember. To do this, follow these steps:

1. Log in to your account [using SSH](/docs/using-ssh-secure-shell).

2. At the command prompt, type the following commands:

   ```bash theme={null}
   mkdir ~/lib
   cd ~/lib
   npm install ember-cli
   ```

3. To create a symbolic link that enables you to run Ember from any directory in your account, type the following commands:

   ```bash theme={null}
   cd ~/bin
   ln -s ../lib/node_modules/ember-cli/bin/ember ember
   ```

4. To confirm that Ember is installed and configured correctly, type the following command:

   ```bash theme={null}
   ember --version
   ```

   Ember displays the version number.

   > 👍 Tip
   >
   > To display Ember's online help, type the following command:
   >
   > ```bash theme={null}
   > ember help
   > ```

## Step 3: Create an Ember.js application

After you install Ember, you are ready to create an Ember.js application and integrate it with the web server. To do this, follow these steps:

1. At the command prompt, type the following commands:

   ```bash theme={null}
   cd ~
   ember new testProject
   ```

   This creates a new Ember application named *testProject*.

2. To start the Ember application, type the following commands. Replace ***xxxxx*** with a number between **49152** and **65535** (inclusive):

   ```bash theme={null}
   cd ~/testProject
   JOBS=1 nohup ember server --port xxxxx &
   ```

   > 📘 Note
   >
   > * To run Ember on a shared server, you must choose an unused port between **49152** and **65535** (inclusive).
   >
   > * The *&* places the command in the background, and the *nohup* command ensures that the application continues running even if you log out of the current terminal session.

3. Type the following command:

   ```bash theme={null}
   cd ~/public_html
   ```

4. In your preferred text editor, create an *.htaccess* file and add the following lines:

   ```
   RewriteEngine On
   RewriteRule ^$ http://127.0.0.1:xxxxx/ [P,L]
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule ^(.*)$ http://127.0.0.1:xxxxx/$1 [P,L]
   ```

5. In both **RewriteRule** lines, replace ***xxxxx*** with the port you specified in step 2.

6. Save the changes to the *.htaccess* file, and then exit the text editor.

7. Use your web browser to visit your web site. If the Ember application is running, you see the **Welcome to Ember** page.

   > 👍 Tip
   >
   > * If the Ember application fails to start, the port you chose may already be in use. Check the application log or *nohup.out* file for error codes that indicate the port is in use. If it is, select a different port number for your application, update the *.htaccess* file with the new port number, and then try again.
   >
   > * To stop a currently running Ember application, type the following command:
   >
   >   ```bash theme={null}
   >   pkill ember
   >   ```
   >
   >   This command immediately stops all running Node.js applications.

## Troubleshooting Ember.js-enabled pages

Because Ember.js is JavaScript-based and runs on the client, you can use a web browser to troubleshoot and diagnose problems. Many web browsers include a console that provides detailed information about the JavaScript run-time environment. This information is extremely helpful for debugging applications:

* **Mozilla Firefox:** On the **Tools** menu, click **Web Developer**, and then click **Web Console**.

* **Google Chrome:** Click the ![Google Chrome settings icon](https://static.hosting.com/kb/kb-chrome-settings-icon.png) icon, click **Tools**, and then click **JavaScript Console**.

* **Microsoft Internet Explorer:** Click the ![Internet Explorer settings icon](https://static.hosting.com/kb/kb-ie-settings-icon.png) icon, click **F12 developer tools**, and then click the **Script** tab.

## More information

* To view the official Ember.js site, please visit [http://emberjs.com](http://emberjs.com).

* To view the official Ember.js documentation, please visit [http://emberjs.com/guides](http://emberjs.com/guides).

## Related articles

* [Installing Sails.js on managed hosting accounts](/docs/installing-sails-js-on-managed-hosting-accounts)

* [jQuery](/docs/jquery)
