Skip to content
tysoncadenhead edited this page Feb 8, 2013 · 1 revision

Install dependencies

Backbone on Express uses Anvil.js for scaffolding, testing and other build operations. To enjoy the benefits of Backbone on Express, it is recommended that you begin by installing Anvil.

npm install anvil.js -g

Currently, the only database driver supported by Backbone on Express is Mongoose. More are coming soon, but for now, you will need to Install Mongoose if you don't already have it.

Install backbone on express

Next, you will need to install Backbone on Express.

npm install backbone-on-express -g
sudo npm link backbone-on-express

Scaffold your app

Start off by creating your app directory.

mkdir myApp
cd myApp

Now you are ready to generate your app:

anvil gen boe

The generator will guide you through a process where it asks you a few questions. Answer them as honestly as possible.

Next, you can generate the crud functionality for a model. Maybe create a user.

anvil gen boe:crud

Now, you just need to start your server.

backbone server

If you navigate to http://localhost:1117, you will see the default index page.

If you go to http://localhost:1117/user, you will see the user index.

Clone this wiki locally