oneuptime/helm-chart/server.js
2020-03-22 15:22:56 +01:00

22 lines
565 B
JavaScript

const express = require('express');
const app = express();
const path = require('path');
// set the server port
app.set('port', process.env.PORT || 3423);
// set the view engine to ejs
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'ejs');
//serve files in public directory
app.use(
['/chart', '/'],
express.static(path.join(__dirname, 'public'), { maxAge: 2592000 })
);
app.listen(app.get('port'), function() {
// eslint-disable-next-line no-console
console.log('API Reference started on PORT:' + app.get('port'));
});