This article describes how to install Ember.js on a managed hosting account.
Ember.js is a client-side JavaScript web application framework used to create single-page applications. Ember.js is based on the model-view-controller (MVC) architecture and includes support for automatically updating templates, application state management, and much more.
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.
After you install Node.js on your account, you are ready to install Ember. To do this, follow these steps:
mkdir ~/lib cd ~/lib npm install ember-cli
To create a symbolic link that enables you to run Ember from any directory in your account, type the following commands:
cd ~/bin ln -s ../lib/node_modules/ember-cli/bin/ember ember
To confirm that Ember is installed and configured correctly, type the following command:
ember --version
Ember displays the version number.
To display Ember's online help, type the following command:
ember help
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:
cd ~ ember new testProject
This creates a new Ember application named testProject.
To start the Ember application, type the following commands. Replace xxxxx with a number between 49152 and 65535 (inclusive):
cd ~/testProject
JOBS=1 nohup ember server --port xxxxx &
Type the following command:
cd ~/public_html
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]
Use your web browser to visit your web site. If the Ember application is running, you see the Welcome to Ember page.
pkill ember
This command immediately stops all running Node.js applications.
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:
Subscribe to receive weekly cutting edge tips, strategies, and news you need to grow your web business.
No charge. Unsubscribe anytime.
Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.
We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.