Added installation instructions
parent
f81651abdf
commit
1d2be86bde
14
README.md
14
README.md
|
@ -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
|
||||
```
|
24
server.js
24
server.js
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue