How To Setup Your Ember Project With Node or io.js And Express

Using a great front-end framework like Ember is fun to use. Unfortunately most applications we write are going to need some sort of back-end. We could go with Firebase and I've done that in a previous post. What else is out there?

Most people would argue that Rails is the way to go and they aren't wrong. If you're looking to learn more about that check out Rails to Ember. It's a great guide on combining them and you should check it out. I'll be looking into ROR more in the future so stay tuned.

What if we wanted to stick with JavaScript in the front and back-end? I think that's a reasonable choice and something that I'm going to explore today.

In this first post we'll be creating a Express server that serves up a Ember application. We'll be going over adding a database in the next post.

Getting Started

As always before you begin make sure you have iojs or Node installed. Check out my iojs installation post if you need help with that. In this tutorial we are going to use Express. If you need help getting that installed check out my Express guide.

Folders

We'll begin by creating a new folder and setting up our server.js. We'll bypass using the Express generator for now.

$ mkdir NodeEmberTest
$ cd NodeEmberTest
$ mkdir app
$ mkdir public

The app folder will have our routes in it. The public folder is where we'll be storing our Ember project.