Files
koodiklinikka.fi-api/index.js
2015-01-16 23:32:57 +02:00

19 lines
396 B
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'use strict';
var express = require('express');
var bodyParser = require('body-parser');
var app = express();
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: true}));
require('./routes/invite')(app);
app.use(function(err, req, res, next) {
console.error(err.message);
console.error(err.stack);
res.status(500).send('Internal server error');
});
app.listen(9000);