0

Running your Mojito app on the Nodejitsu public beta hosting service

Hi Guys,


We had several questions along the lines of how to host the awesome apps that we create with Mojito, since Manhattan is only available at Yahoo! at the moment. Nodejitsu (http://nodejitsu.com/) just started their public beta. The good news is that nodejitsu works with Mojito. After you've registered on nodejitsu, go to your favorite app and modify the package.json as well as the server.js file. Your package.json should contain:
 
{
  ...
  "scripts": {
    "start": "server.js"
  }
  ...
}

And your server.json should look like this:
 
/*
 * 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*/


/**
 * Starts a new Mojito server instance.
 */
var mojito = require('mojito');
new mojito.constructor().createServer().listen(80);

I hope this helps everyone, who has been waiting for a nice and easy way to host their creations. I am eager to see what others are building.

Our app:
http://fabianfrank.myweatherapp.jit.su/
source and documentation for this app:
http://www.yuiblog.com/blog/2012/07/09/yui-open-hours-thurs-july-12th/


Regards,
Fabian

by
2 Replies
  • I am sorry for the bad formatting. Please see the formatted code on Github.

    package.json should contain:
    https://gist.github.com/3110026

    server.js:
    https://gist.github.com/3110027
    0
  • It also works on Heroku:
    http://mojito-demo.herokuapp.com/

    Necessary code changes:
    https://github.com/FabianFrank/trainingMojito/compare/FabianFrank%3Amaster...heroku


    http://www.heroku.com/
    0

Recent Posts

in Yahoo! Mojito