Permalink
Browse files

decouple from express

  • Loading branch information...
1 parent b3c2e61 commit 904de4ab1f13545d5fabaa62821bebeef3c3199a @gcpantazis committed Dec 5, 2012
Showing with 8 additions and 8 deletions.
  1. +2 −1 README.md
  2. +6 −7 classTypes/view.js
View
@@ -5,13 +5,14 @@ Experimental package to give (very very) basic Backbone structures to node proje
##How to use
-* Install with: ```npm install node-backbone```.
+* Install with: ```npm install nodebackbone```.
* For usage examples please refer to [this project](https://github.com/gcpantazis/node-backbone-boilerplate).
##Changelog
+* v0.1.4 Misc changes, experimenting with new class types.
* v0.1.2 Add verbs for routes.
* v0.1.1 More for initial release.
* v0.1.0 Initial release.
View
@@ -29,14 +29,13 @@ exports.init = function(){
res.send('Error: View not set.', 404);
},
- _appready: function(app){
- if ( this.action === 'GET' ) app.get(this.route, this.render);
- if ( this.action === 'POST' ) app.post(this.route, this.render);
- if ( this.action === 'PUT' ) app.put(this.route, this.render);
- },
-
_listener: function(){
- global.on('ready:app', this._appready);
+
+ var view = this;
+
+ global.on('ready:app', function(){
+ global.trigger('ready:view', view);
+ });
},
_configure: function(options) {

0 comments on commit 904de4a

Please sign in to comment.