2017-02-18 20:02:08 +01:00
|
|
|
var express = require('express');
|
|
|
|
var cors = require('cors');
|
2020-11-23 21:27:07 +01:00
|
|
|
require('dotenv').config()
|
2017-02-18 20:02:08 +01:00
|
|
|
|
|
|
|
var app = express();
|
|
|
|
|
|
|
|
app.use(cors());
|
|
|
|
app.use('/public', express.static(process.cwd() + '/public'));
|
|
|
|
|
|
|
|
app.get('/', function (req, res) {
|
2020-11-23 21:27:07 +01:00
|
|
|
res.sendFile(process.cwd() + '/views/index.html');
|
2017-02-18 20:02:08 +01:00
|
|
|
});
|
|
|
|
|
2020-11-23 21:27:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const port = process.env.PORT || 3000;
|
|
|
|
app.listen(port, function () {
|
|
|
|
console.log('Your app is listening on port ' + port)
|
2017-02-18 20:02:08 +01:00
|
|
|
});
|