mirror of
https://github.com/wassname/HackFlowy.git
synced 2026-07-11 00:40:31 +08:00
Heroku integration with foreman
Add foreman configuration for Heroku: - To test production configuration execute NODE_ENV=production foreman start - Database connection configuration now handles "use_env_variable" which should be defined as a environment variable such as "DATABASE_URL" with a proper database URI connection string, ie: postgres://user:password@db.example.com:5432/database - Added package.json configuration to run migrations and db seed after `npm install` Update frontend models to match sequelize definition. Update views to work according to the changes above. Handling isCompleted and parentId apropiately for PostgreSQL databases
This commit is contained in:
@@ -9,20 +9,20 @@ Backbone
|
||||
var TaskModel = Backbone.Model.extend({
|
||||
|
||||
defaults: {
|
||||
parent_id: '',
|
||||
parentId: 0,
|
||||
content: '',
|
||||
is_completed:'n'
|
||||
isCompleted: 0
|
||||
},
|
||||
|
||||
toggelCompletedStatus:function(isCompleted){
|
||||
var prev_isCompleted = isCompleted,
|
||||
self = this;
|
||||
this.save({'is_completed':isCompleted},
|
||||
this.save({'isCompleted':isCompleted},
|
||||
{
|
||||
success:function(){},
|
||||
error:function(){
|
||||
//REVERT BACK ON ERROR
|
||||
self.set({'is_completed':prev_isCompleted});
|
||||
self.set({'isCompleted':prev_isCompleted});
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -31,4 +31,4 @@ Backbone
|
||||
|
||||
return TaskModel;
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user