quick tidy

This commit is contained in:
Simon Tokumine 2011-10-07 17:28:07 +01:00
parent f50522d72c
commit eba7eb4e28
3 changed files with 35 additions and 32 deletions

6
app.js
View File

@ -12,7 +12,7 @@
var _ = require('underscore');
// sanity check arguments
var ENV = process.argv[2]
var ENV = process.argv[2];
if (ENV != 'development' && ENV != 'production') {
console.error("\n./app [environment]");
console.error("environments: [development, test, production]");
@ -20,8 +20,8 @@ if (ENV != 'development' && ENV != 'production') {
}
// set Node.js app settings and boot
global.settings = require(__dirname + '/config/settings')
var env = require(__dirname + '/config/environments/' + ENV)
global.settings = require(__dirname + '/config/settings');
var env = require(__dirname + '/config/environments/' + ENV);
_.extend(global.settings, env);
// kick off controller

View File

@ -13,7 +13,7 @@ var _ = require('underscore');
var cluster = require('cluster');
// sanity check arguments
var ENV = process.argv[2]
var ENV = process.argv[2];
if (ENV != 'development' && ENV != 'production' && ENV != 'test' && ENV != 'staging') {
console.error("\n./cluster [environment]");
console.error("environments: [development, test, production, staging]");
@ -21,13 +21,11 @@ if (ENV != 'development' && ENV != 'production' && ENV != 'test' && ENV != 'stag
}
// set Node.js app settings and boot
global.settings = require(__dirname + '/config/settings')
var env = require(__dirname + '/config/environments/' + ENV)
global.settings = require(__dirname + '/config/settings');
var env = require(__dirname + '/config/environments/' + ENV);
_.extend(global.settings, env);
cluster('./app/controllers/app')
// .set('workers', 2)
// .set('socket path', '/tmp')
.use(cluster.logger('logs'))
.use(cluster.stats())
.use(cluster.pidfiles('pids'))

View File

@ -3,6 +3,11 @@
"name": "cartodb_api",
"description": "high speed SQL api for cartodb",
"version": "0.0.1",
"author": {
"name": "Simon Tokumine, Vizzuality",
"url": "http://vizzuality.com",
"email": "simon@vizzuality.com"
},
"dependencies": {
"cluster": "0.6.4",
"express": "2.4.3",