0

Does anyone know of any tutorials or examples of applications built with SpineJS and Express? I've played around a lot with both but struggling to understand a few points. Currently I've got my back end working by doing coffee app.coffee which runs express and basically serves as an API to the CouchDB. Then hem server runs Spine, running off a different port - this can't be the way to go, surely?

  • Do spine apps have to be built/served using Hem? It seems hem stitches all the front-end dependencies into a nice application.js file for you to serve up. Presumably this could be done using GruntJS or something and then served by Express, right? It would be a slight hassle to stitch all the dependencies together into the same handy application.js file but doable. Is there an easy way that I'm not seeing?
  • Can the server (node/express) use the same Models and Controllers as the front-end application -i.e. using Spine models/controllers in Express. It says in the Spine documentation that this is possible but I haven't been able to find any tutorials or examples. Is it just a case of including express = require 'express' in the controllers?

Thanks

Snowman
  • 1,160
  • 1
  • 8
  • 24

1 Answers1

0

Spine doesn't have to be used with Hem, you can do it manually, or use another tool like GruntJS or Yeoman.

As for using Spine for models and controllers on Express, as far as I know this is merely a theoretical possibility. It's all just Javascript, but I don't know of any examples of using it this way or any dev tool setups to help with using spine and express in that way. Either way the models and controllers on the back and front ends while they might be similar are not likely to be the same because of the different environment concerns, so I don't see you being able to share much code there.

aeischeid
  • 576
  • 3
  • 12