Browse files

using spinegoose npm

  • Loading branch information...
1 parent e668910 commit bb6ad503091862c7bce169f9f057edda7e5b6d4c Chris Nelson committed Jan 18, 2012
Showing with 10 additions and 7 deletions.
  1. +2 −2 package.json
  2. +8 −5 server.coffee
View
4 package.json
@@ -13,7 +13,7 @@
"spine": "latest",
"mongoose": "latest",
"coffee-script": "latest",
- "mongoose-rest": "https://github.com/gaslight/mongoose-rest/tarball/master",
- "express": "latest"
+ "express": "latest",
+ "spinegoose": "*"
}
}
View
13 server.coffee
@@ -17,14 +17,17 @@ app.get(hem.options.jsPath, hem.hemPackage().createServer())
app.use(express.static("./public"))
# mongoose-rest gives us restful route for our mongoose models
-mongooseRest = require("mongoose-rest")
-mongooseRest.use(app, mongoose)
+# mongooseRest = require("mongoose-rest")
+# mongooseRest.use(app, mongoose)
require "spine/lib/ajax"
Contact = require("./app/models/contact")
-spineGoose = require("./lib/mongoose-spine")
-spineGoose.mountModel(app, Contact)
-
+SpineGoose = require("spinegoose")
+spineGoose = new SpineGoose
+ app: app
+ mongoose: mongoose
+ models: [Contact]
+
app.listen(3000)

0 comments on commit bb6ad50

Please sign in to comment.