BattleSim/start.js

21 lines
582 B
JavaScript
Raw Normal View History

2016-02-01 22:19:30 +00:00
process.env.NODE_ENV = process.env.NODE_ENV || "development";
switch (process.env.POKEBATTLE_ENV) {
case "api":
var PORT = process.env.PORT || 8082;
require('coffee-script/register');
require('./api').createServer(PORT);
break;
case "sim":
default:
if (process.env.NODE_ENV === 'production') {
//require('nodetime').profile(require('./nodetime.json'));
}
var PORT = process.env.PORT || 8000;
require('coffee-script/register');
require('./server').createServer(PORT);
require('./server/schedule').createScheduler();
break;
}