Jeff
Jeff

Reputation: 2423

backbone boilerplate code and building with grunt bbb

I've been following Addy Osmani's guide on using grunt and the bbb plugin to build a small backbone.js app. However, I am still confused about a couple of things. For instance, after running "bbb init" my page will not load. I get reference errors on both the css and require.js files.

I am building in a LAMP environment (MAMP on OSX). I know grunt-bbb can work off of Node.js but does it have to? Backbone after all is a client side mvc framework, so I believe it should work. When I run "bbb server" to start the development server, then everything seems fine. But I won't be able to deploy to a node server. I have to host my app on Apache.

Upvotes: 0

Views: 1857

Answers (1)

Simon Boudrias
Simon Boudrias

Reputation: 44649

Are you running your app in a subfolder? (e.g.: localhost/my/app) Or to the root?

Backbone-Boilerplate set the app.root value to / by default. If you're running in a subfolder, you'll need to update the value here: https://github.com/tbranyen/backbone-boilerplate/blob/master/app/app.js#L14

Also update files path in index.html (line 13 and line 33)

If you're not using pushState, you can set the value to an empty string. Otherwise, add the root folder.

Upvotes: 2

Related Questions