mirror of
https://github.com/wassname/HackFlowy.git
synced 2026-06-27 16:00:04 +08:00
Initial heroku integration
This commit is contained in:
@@ -16,3 +16,5 @@ results
|
||||
|
||||
npm-debug.log
|
||||
node_modules
|
||||
|
||||
*.sqlite
|
||||
|
||||
@@ -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
@@ -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();
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user