repo for angularjs testing training
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

26 lines
727 B

var express = require('express'),
app = express(),
bodyParser = require('body-parser'),
morgan = require('morgan'),
path = require('path');
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());
app.use(function(req, res, next) {
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', 'GET, POST');
res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With, content-type, Authorization');
next();
});
app.use(morgan('dev'));
app.use(express.static(__dirname + '/app'));
app.get('*', function(req, res) {
res.sendFile(path.join(__dirname + '/index.html'));
});
app.listen(8080);
console.log('meet-irl is running on 8080');