filemetadata/index.js

21 lines
420 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) {
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
});