Telegram Web K with changes to work inside I2P
https://web.telegram.i2p/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
711 B
25 lines
711 B
const compression = require('compression'); |
|
const express = require('express'); |
|
const https = require('https'); |
|
const fs = require('fs'); |
|
|
|
const app = express(); |
|
|
|
const thirdTour = process.argv[2] == 3; |
|
|
|
const publicFolderName = thirdTour ? 'public3' : 'public'; |
|
const port = thirdTour ? 8443 : 443; |
|
|
|
app.use(compression()); |
|
app.use(express.static(publicFolderName)); |
|
|
|
app.get('/', (req, res) => { |
|
res.sendFile(__dirname + `/${publicFolderName}/index.html`); |
|
}); |
|
|
|
https.createServer({ |
|
key: fs.readFileSync(__dirname + '/certs/server-key.pem'), |
|
cert: fs.readFileSync(__dirname + '/certs/server-cert.pem') |
|
}, app).listen(port, () => { |
|
console.log('Listening port:', port, 'folder:', publicFolderName); |
|
}); |