Simultaneous Mojito deployment technique for Heroku and Nodejitsu
/*
* Copyright (c) 2011-2012, Yahoo! Inc. All rights reserved.
* Copyrights licensed under the New BSD License.
* See the accompanying LICENSE file for terms.
*/
/*jslint anon:true, sloppy:true*/
/**
* Returns a new Mojito server instance.
*/
var mojito = require('mojito');
new mojito.constructor().createServer().listen(process.env.PORT || 80);
{
"name": "hello_world",
"description": "My Mojito application",
"version": "0.0.1-2",
"author": {
"name": "Your Name",
"email": "nobody@yahoo-inc.com"
},
"contributors": [
{
"name": "Your Name",
"email": "nobody@yahoo-inc.com"
}
],
"dependencies": {
"mojito": ">= 0.1.0"
},
"engines": {
"node": ">= 0.4.2 < 0.5.0"
},
"scripts": {
"start": "node server.js"
},
"subdomain": "nobody.hello"
}
> git init
> git add .
> git commit -m "My favorite messages are commit messages"
> heroku create hellomojito
> git push heroku
> jitsu deploy
web: node server.js