tweb-i2p/server.js
morethanwords 0b70e1af8c Almost completed task #1
New storage (CacheStorage)
Safari fixes
Webpack configuration
New slider animation
2020-06-05 19:01:06 +03:00

20 lines
489 B
JavaScript

const compression = require('compression');
const express = require('express');
const https = require('https');
const fs = require('fs');
const app = express();
app.use(compression());
app.use(express.static('public'));
app.get('/', (req, res) => {
res.sendFile(__dirname + '/public/index.html');
});
https.createServer({
key: fs.readFileSync(__dirname + '/tweb.key'),
cert: fs.readFileSync(__dirname + '/tweb.crt')
}, app).listen(9001, () => {
console.log('Listening...');
});