Added installation instructions

master
Keith Irwin 2016-04-28 04:02:13 +00:00
parent f81651abdf
commit 1d2be86bde
2 changed files with 26 additions and 12 deletions

View File

@ -1,3 +1,17 @@
# Tracman
node.js application to display a map with user's location. Live at [tracman.org](https://tracman.org/).
The github for the associated android app is [Tracman-org/Android](https://github.com/tracman-org/android).
## Installation
```sh
$ git clone https://github.com/Tracman-org/Server.git
$ cd Server
$ npm install
```
## Running
```sh
$ npm start
```

View File

@ -73,18 +73,18 @@ app.use('/static', express.static(__dirname+'/static'));
// Handle errors
// if (secret.url=='https://tracman.org') {
// var handle404 = function(err,req,res,next) {
// if (err) { console.log('404 handling error: '+err); }
// res.render('error.html', {code:404});
// };
// var handle500 = function(err,req,res,next) {
// if (err) { console.log('500 handling error: '+err); }
// res.render('error.html', {code:500});
// };
// app.use(crash.handle404(handle404));
// app.use(crash.handle500(handle500));
// crash.trapRoute(app);
// crash.handle(app, handle404, handle500);
var handle404 = function(err,req,res,next) {
if (err) { console.log('404 handling error: '+err); }
res.render('error.html', {code:404});
};
var handle500 = function(err,req,res,next) {
if (err) { console.log('500 handling error: '+err); }
res.render('error.html', {code:500});
};
app.use(crash.handle404(handle404));
app.use(crash.handle500(handle500));
crash.trapRoute(app);
crash.handle(app, handle404, handle500);
// }
/* RUNTIME */