Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b34025ab40
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 29 lines (25 sloc) 0.981 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
#!/usr/bin/env node

// load in the actionHero class
var actionHero = require(__dirname + "/api.js").actionHero; // normally if installed by npm: var actionHero = require("actionHero").actionHero;

// if there is no config.js file in the application's root, then actionHero will load in a collection of default params. You can overwrite them with params.configChanges
var params = {};
params.configChanges = {
"database" : {
        "host" : "127.0.0.1",
"database" : "action_hero_api",
"username" : "root",
"password" : null,
"port" : "3306",
"consoleLogging" : false
    },
"flatFileDirectory":"./public/"
}

// any additional functions you might wish to define to be globally accessable can be added as part of params.initFunction. The api object will be availalbe.
params.initFunction = function(api, next){
api.randomNumberGenerator = Math.random() * 100;
next();
}

// start the server!
actionHero.start(params, function(api){
api.log("Boot Sucessful!");
});
Something went wrong with that request. Please try again.