filemetadata/index.js

21 lines
418 B
JavaScript
Raw Normal View History

2017-02-18 20:02:08 +01:00
var express = require('express');
var cors = require('cors');
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) {
2022-08-01 06:05:26 +02:00
res.sendFile(process.cwd() + '/views/index.html');
2017-02-18 20:02:08 +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
});