var express = require('express');
var app = express();
var path = require('path');
// Define the port to run on
app.set('port', 5000);
app.use(express.static(path.join(__dirname, 'src/sandos_iframe')));
app.use((req, res, next) => {
res.header('Access-Control-Allow-Origin', '*');
res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept');
next();
});
// Listen for requests
var server = app.listen(app.get('port'), function() {
var port = server.address().port;
console.log('Magic happens on port ' + port);
});
const express = require('express');
const app = express();
const path = require('path');
// Define the port to run on
app.set('port', 5000);
app.use(express.static(path.join(__dirname, 'src/sandos_iframe')));
app.use((req, res, next) => {
res.header('Access-Control-Allow-Origin', '*');
res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept');
next();
});
// Listen for requests
const server = app.listen(app.get('port'), function() {
const port = server.address().port;
console.log('Magic happens on port ' + port);
});