Initial heroku integration

This commit is contained in:
DC*
2014-08-14 00:08:12 -03:00
parent 4085e67a34
commit 64cea269a9
5 changed files with 30 additions and 10 deletions
+2
View File
@@ -16,3 +16,5 @@ results
npm-debug.log
node_modules
*.sqlite
+1
View File
@@ -0,0 +1 @@
web: node server.js
+6
View File
@@ -11,6 +11,12 @@ An open-source [Workflowy](http://workflowy.com) clone.
* Run migrations and initialize the database: `sequelize-cli -m --config config/database.json` and `node db/seed/initial_tasks.js`
* `node server.js`
##Heroku deploy
* heroku create --stack cedar
* git remote add heroku URL from above
* git push heroku master
##Controls
* <kbd>UP</kbd> & <kbd>DOWN</kbd>: navigate through tasks
+12 -10
View File
@@ -1,14 +1,16 @@
var config = require('config'),
orm = require('../../orm').configure(config.get('database')),
Tasks = require('../../db/models/task').instance(orm);
orm = require('../../orm').configure(config.get('database')),
Tasks = require('../../db/models/task').instance(orm);
Tasks.bulkCreate([
{content: 'Welcome to HackFlowy!', isCompleted: false},
{content: 'An open-source WorkFlowy clone', isCompleted: false},
{content: 'Built using Backbone + Socket.IO', isCompleted: false},
{content: 'I pulled this together in a few hours to learn Backbone', isCompleted: false},
{content: 'Feel free to try it out and hack on it', isCompleted: false},
{content: 'Good Luck!', isCompleted: false}
]);
Tasks.destroy().success(function() {
Tasks.bulkCreate([
{content: 'Welcome to HackFlowy!', isCompleted: false},
{content: 'An open-source WorkFlowy clone', isCompleted: false},
{content: 'Built using Backbone + Socket.IO', isCompleted: false},
{content: 'I pulled this together in a few hours to learn Backbone', isCompleted: false},
{content: 'Feel free to try it out and hack on it', isCompleted: false},
{content: 'Good Luck!', isCompleted: false}
]);
});
orm.sync();
+9
View File
@@ -10,5 +10,14 @@
"sequelize": "~1.7.9",
"socket.io": "~1.0.6",
"config": "~1.0.2"
},
"engines": {
"node": "0.10.x"
},
"scripts": {
"start": "node server.js",
"db:migrate": "./node_modules/sequelize/bin/sequelize -m --config config/database.json",
"db:seed": "node db/seed/initial_tasks.js",
"postinstall": "npm run db:migrate && npm run db:seed"
}
}