Skip to content

Commit

Permalink
added new http port to conf and added conf var to server
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Ive committed Mar 25, 2012
1 parent 13df28b commit fe53750
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions conf/config.js
Expand Up @@ -11,6 +11,11 @@ config.db = {
} }
}; };



config.http = {
port:16156
}

config.importer = { config.importer = {
path: '/Users/richardive/Development/postcodes/Data/' path: '/Users/richardive/Development/postcodes/Data/'
} }
Expand Down
4 changes: 3 additions & 1 deletion server.js
Expand Up @@ -29,6 +29,8 @@ app.all('/postcode/:postcode.:format?', function(req, res){
postcode = req.params.postcode.replace(/ /gi, '').toUpperCase(); postcode = req.params.postcode.replace(/ /gi, '').toUpperCase();


if(postcode){ if(postcode){

console.log("Fetching: " + postcode);


switch(format){ switch(format){
case 'xml': case 'xml':
Expand Down Expand Up @@ -58,4 +60,4 @@ app.get('*', function(req,res){
}); });


//bind server port //bind server port
app.listen(16156); app.listen(config.http.port);

0 comments on commit fe53750

Please sign in to comment.