fixed port

This commit is contained in:
Martin Donnelly 2015-08-04 17:10:05 +01:00
parent a6f765c6a1
commit f807fab266
3 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@ GLOBAL.lastcheck = 0;
var btcCache = {}, fxCache = {} , trainCache = {};
app.configure(function () {
app.set('port', process.env.PORT || 4545);
app.set('port', process.env.PORT || 9000);
app.use(express.logger('dev'));
app.use(express.cookieParser());
app.use(express.session({secret: '1234567890QWERTY'}));

2
web-server.min.js vendored
View File

@ -1,2 +1,2 @@
var express=require("express"),path=require("path"),http=require("http"),fx=require("./lib/fx"),btc=require("./lib/btc"),train=require("./lib/train"),app=express();GLOBAL.lastcheck=0;var btcCache={},fxCache={},trainCache={};app.configure(function(){app.set("port",process.env.PORT||4545),app.use(express.logger("dev")),app.use(express.cookieParser()),app.use(express.session({secret:"1234567890QWERTY"})),app.use(express.methodOverride()),app.use(express.bodyParser()),app.use(function(e,t,o){t.header("Access-Control-Allow-Origin","*"),t.header("Access-Control-Allow-Headers","X-Requested-With"),o()}),app.use(app.router),app.use(express.static(path.join(__dirname,"app"))),app.use(express.errorHandler({dumpExceptions:!0,showStack:!0})),app.use("/btc",btc.doBTC),app.use("/fx",fx.doFx),app.use("/dbeglq",train.dbe_glq),app.use("/glqdbe",train.glq_dbe),app.use("/lot",function(){var e=require("pg"),t="postgres://pguser:1V3D4m526i@localhost/silver";console.log(t);var o=new e.Client(t),n="select * from lot order by d desc";o.connect(function(e){return e?console.error("could not connect to postgres",e):void o.query(n,function(e,t){return e?console.error("error running query",e):(console.log(t.rows[0].theTime),void o.end())})})})}),http.createServer(app).listen(app.get("port"),function(){console.log("Express server listening on port "+app.get("port"))});
var express=require("express"),path=require("path"),http=require("http"),fx=require("./lib/fx"),btc=require("./lib/btc"),train=require("./lib/train"),app=express();GLOBAL.lastcheck=0;var btcCache={},fxCache={},trainCache={};app.configure(function(){app.set("port",process.env.PORT||9e3),app.use(express.logger("dev")),app.use(express.cookieParser()),app.use(express.session({secret:"1234567890QWERTY"})),app.use(express.methodOverride()),app.use(express.bodyParser()),app.use(function(e,r,s){r.header("Access-Control-Allow-Origin","*"),r.header("Access-Control-Allow-Headers","X-Requested-With"),s()}),app.use(app.router),app.use(express.static(path.join(__dirname,"app"))),app.use(express.errorHandler({dumpExceptions:!0,showStack:!0})),app.use("/btc",btc.doBTC),app.use("/fx",fx.doFx),app.use("/dbeglq",train.dbe_glq),app.use("/glqdbe",train.glq_dbe),app.use("/lot",function(){var e=require("pg"),r="postgres://pguser:1V3D4m526i@localhost/silver";console.log(r);var s=new e.Client(r),p="select * from lot order by d desc";s.connect(function(e){return e?console.error("could not connect to postgres",e):void s.query(p,function(e,r){return e?console.error("error running query",e):(console.log(r.rows[0].theTime),void s.end())})})})}),http.createServer(app).listen(app.get("port"),function(){console.log("Express server listening on port "+app.get("port"))});
//# sourceMappingURL=web-server.min.js.map

View File

@ -1 +1 @@
{"version":3,"sources":["web-server.js"],"names":["express","require","path","http","fx","btc","train","app","GLOBAL","lastcheck","btcCache","fxCache","trainCache","configure","set","process","env","PORT","use","logger","cookieParser","session","secret","methodOverride","bodyParser","req","res","next","header","router","static","join","__dirname","errorHandler","dumpExceptions","showStack","doBTC","doFx","dbe_glq","glq_dbe","pg","conString","console","log","client","Client","q","connect","err","error","query","result","rows","theTime","end","createServer","listen","get"],"mappings":"AAAA,GAAIA,SAAUC,QAAQ,WAAYC,KAAOD,QAAQ,QAASE,KAAOF,QAAQ,QAASG,GAAKH,QAAQ,YAAaI,IAAMJ,QAAQ,aAAcK,MAAQL,QAAQ,eAIpJM,IAAMP,SACVQ,QAAOC,UAAY,CACnB,IAAIC,aAAeC,WAAeC,aAElCL,KAAIM,UAAU,WACVN,IAAIO,IAAI,OAAQC,QAAQC,IAAIC,MAAQ,MACpCV,IAAIW,IAAIlB,QAAQmB,OAAO,QACvBZ,IAAIW,IAAIlB,QAAQoB,gBAChBb,IAAIW,IAAIlB,QAAQqB,SAASC,OAAQ,sBAEjCf,IAAIW,IAAIlB,QAAQuB,kBAEhBhB,IAAIW,IAAIlB,QAAQwB,cAEhBjB,IAAIW,IAAI,SAAUO,EAAKC,EAAKC,GACxBD,EAAIE,OAAO,8BAA+B,KAC1CF,EAAIE,OAAO,+BAAgC,oBAC3CD,MAEJpB,IAAIW,IAAIX,IAAIsB,QACZtB,IAAIW,IAAIlB,QAAQ8B,OAAO5B,KAAK6B,KAAKC,UAAW,SAC5CzB,IAAIW,IAAIlB,QAAQiC,cAAcC,gBAAgB,EAAMC,WAAW,KAE/D5B,IAAIW,IAAI,OAAQb,IAAI+B,OAEpB7B,IAAIW,IAAI,MAAOd,GAAGiC,MAElB9B,IAAIW,IAAI,UAAWZ,MAAMgC,SAEzB/B,IAAIW,IAAI,UAAWZ,MAAMiC,SAEzBhC,IAAIW,IAAI,OAAQ,WACZ,GAAIsB,GAAKvC,QAAQ,MAEbwC,EAAY,+CAChBC,SAAQC,IAAIF,EAGZ,IAAIG,GAAS,GAAIJ,GAAGK,OAAOJ,GACvBK,EAAI,mCACRF,GAAOG,QAAQ,SAASC,GACpB,MAAGA,GACQN,QAAQO,MAAM,gCAAiCD,OAE1DJ,GAAOM,MAAMJ,EAAG,SAASE,EAAKG,GAC1B,MAAGH,GACQN,QAAQO,MAAM,sBAAuBD,IAEhDN,QAAQC,IAAIQ,EAAOC,KAAK,GAAGC,aAE3BT,GAAOU,eASvBnD,KAAKoD,aAAahD,KAAKiD,OAAOjD,IAAIkD,IAAI,QAAS,WAC3Cf,QAAQC,IAAI,oCAAsCpC,IAAIkD,IAAI"}
{"version":3,"sources":["web-server.js"],"names":["express","require","path","http","fx","btc","train","app","GLOBAL","lastcheck","btcCache","fxCache","trainCache","configure","set","process","env","PORT","use","logger","cookieParser","session","secret","methodOverride","bodyParser","req","res","next","header","router","static","join","__dirname","errorHandler","dumpExceptions","showStack","doBTC","doFx","dbe_glq","glq_dbe","pg","conString","console","log","client","Client","q","connect","err","error","query","result","rows","theTime","end","createServer","listen","get"],"mappings":"AAAA,GAA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