mirror of
https://github.com/GenderDysphoria/GenderDysphoria.fyi.git
synced 2025-01-31 07:16:17 +00:00
24 lines
631 B
JavaScript
24 lines
631 B
JavaScript
|
const express = require('express');
|
||
|
const morgan = require('morgan');
|
||
|
const directory = require('serve-index');
|
||
|
const log = require('fancy-log');
|
||
|
|
||
|
var app = express();
|
||
|
|
||
|
app.disable('etag');
|
||
|
app.use(morgan('dev'));
|
||
|
|
||
|
app.use((req, res, next) => {
|
||
|
res.set('Cache-Control', 'no-store, no-cache, must-revalidate, private');
|
||
|
req.headers['if-none-match'] = 'no-match-for-this';
|
||
|
next();
|
||
|
});
|
||
|
|
||
|
app.use(express.static('dist', { etag: false, maxAge: 5 }));
|
||
|
|
||
|
app.use(directory('dist', { 'icons': true }));
|
||
|
|
||
|
app.get('/i', (req, res) => res.send(''));
|
||
|
|
||
|
app.listen(process.env.PORT || 8000, () => log('Listening on http://127.0.0.1:8000'));
|