Skip to content

Installing Ember.js on managed hosting accounts

Learn how to install Ember.js on a managed hosting account. This client-side JavaScript framework is used to create single-page applications.

Ember.js is based on the model-view-controller (MVC) architecture and provides features such as automatic template updates, application state management, and more.

Ember.js requires Node.js, so the first step is to install Node.js and npm (Node.js package manager) on your account. Follow the instructions in this article for step-by-step guidance.

After installing Node.js, you can install Ember.js:

  1. Log in to your account using SSH.
  2. Run the following commands:
mkdir ~/lib
cd ~/lib
npm install ember-cli
  1. Create a symbolic link to run Ember from any directory:
cd ~/bin
ln -s ../lib/node_modules/ember-cli/bin/ember ember
  1. Verify the installation:
ember --version

This displays the Ember version installed.

Tip: To view Ember’s online help:

ember help
  1. Create a new Ember application:
cd ~
ember new testProject

This creates an Ember application named testProject.

  1. Start the Ember application (choose a port between 49152 and 65535):
cd ~/testProject
JOBS=1 nohup ember server --port xxxxx &
  • The & runs the command in the background.
  • nohup ensures the application continues running even after logging out.
  1. Configure your web server:
cd ~/public_html

Create or edit an .htaccess file with:

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]

Replace xxxxx with the port number used in the previous step.

  1. Open your website in a browser. You should see the “Welcome to Ember” page.

Tip: If the application fails to start, the chosen port may be in use. Check nohup.out for errors, select another port, update the .htaccess file, and restart.

  1. To stop Ember:
pkill ember

This stops all running Node.js applications immediately.

Because Ember.js runs in the browser, you can use developer tools to troubleshoot:

  • Firefox: Tools → Web Developer → Web Console
  • Chrome: Settings → Tools → JavaScript Console
  • Internet Explorer: Settings → F12 Developer Tools → Script tab