3

I have developed a rest service using express and node.js. I've previously used backbone-boilerplate with a stand alone java rest service, running on different server instances.

Now I want to integrate bbb with my node rest server for easy deploying on Heroku.

Are there any disanvantages to combine bbb with the rest server?

What is the best approach to configure bbb to run on the same server?

I've searched without finding any discussions about the issue.

2 Answers2

1

This question could be discussed a lot of course. Here is what I could contribute

BBB works best with AMD modules. So if you have not really used them in your current Backbone application with REST, then you should look into these. Maybe that will take a bit of pain when switching, but it will be worth your while. Here you can find how to deploy BBB to a given Backbone RESTful app.

Using any nodeJS framework with a backbone app is very versatile and (for me at least) gives you a maintainable code if the project fits the MVC schema.

You might also try to think about switching your original JAVA based rest service to another one that uses express and socketIO. They both work really well when it comes to creating scalable apps. Together with a mongoDB you are good to go.

toxicate20
  • 5,270
  • 3
  • 26
  • 38
0

BBB works great with a restful web service. To integrate it you need to configure your express server to serve up the static files from BBB (libs, css, templates, views & models).

An alternative would be to serve your BBB files from an nginx server or a Content Distribution Network.

For development purposes, it's often useful to be able to make api / frontend changes simultaneously and have your code recompile/reload. I created a Express/Backbone boilerplate project that does this here: webapp-boilerplate.

Rudolf Meijering
  • 1,559
  • 1
  • 14
  • 20