Skip to content

Instantly share code, notes, and snippets.

@clarle
Created July 31, 2012 06:52
Show Gist options
  • Save clarle/3214349 to your computer and use it in GitHub Desktop.
Save clarle/3214349 to your computer and use it in GitHub Desktop.
Simultaneous Mojito deployment technique for Heroku and Nodejitsu

To deploy to Heroku

> git init
> git add .
> git commit -m "My favorite messages are commit messages"
> heroku create hellomojito
> git push heroku

To deploy to Nodejitsu

> jitsu deploy
{
"name": "hello_world",
"description": "My Mojito application",
"version": "0.0.1-2",
"author": {
"name": "Your Name",
"email": "[email protected]"
},
"contributors": [
{
"name": "Your Name",
"email": "[email protected]"
}
],
"dependencies": {
"mojito": ">= 0.1.0"
},
"engines": {
"node": ">= 0.4.2 < 0.5.0"
},
"scripts": {
"start": "node server.js"
},
"subdomain": "nobody.hello"
}
web: node server.js
/*
* 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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment