a blog for those who code

Wednesday 9 November 2016

Converting TodoApp in Ember Application to FastBoot

In this post we will be discussing about Ember Fastboot. As you all know Ember.js is a framework for creating ambitious web applications. With simple syntax and an emphasis on reuse and components, this JavaScript framework can make it very easy to create interactive pages. FastBoot will help you to render and serve your Ember application on the server (example Node.js). So that means you can run your application in the browser without requiring the user to download JavaScript files on the client side.


The good thing about running your application using Ember Fastboot is that it will be rendered fast and your ember app will be accessible to everyone even if the JavaScript is turned off.

Installation

You can install Fastboot using the command ember install ember-cli-fastboot

In our one of the previous post we have discussed about creating a TodoApp in Ember Application, and in this post we will run this application using Fastboot.

Now normally we run our Ember application using ember serve, to run it using fastboot we need to run it using the command ember fastboot. It will start our application on port 3000 instead of port 4200 as shown below


If you are getting any error like below where its not able to get the .js and .css files you need to run the Ember application using the command ember fastboot --server-assets



Now when your application will be running everything will look the same as before. The only difference is that using fastboot the body tag is populated with the rendered HTML content.


Please Like and Share the CodingDefined Blog, if you find it interesting and helpful.

No comments:

Post a Comment