diff --git a/index.html b/index.html index 22797f0..5c4b9a4 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,7 @@
- Обновить Толин эмодзи статус! + Обновить Толин эмодзи статус! - Что это? + Что это?
При каждом нажатии на большую кнопку мне дается новый случайно выбранный эмодзи статус. Открой vk.com/akopyl, нажми на кнопку на этом сайте и обнови мою страницу! diff --git a/server/index.js b/server/index.js index e932aa1..675fa4d 100644 --- a/server/index.js +++ b/server/index.js @@ -30,5 +30,12 @@ app.get('/update', (req, res) => { app.use(Express.static(path.join(__dirname, 'public'))); -app.listen(port, () => console.log('Dev server started on ' + port)); - +if (process.env.NODE_ENV === 'production') { + https.createServer({ + key: fs.readFileSync('/etc/letsencrypt/live/studybuddy.top/privkey.pem'), + cert: fs.readFileSync('/etc/letsencrypt/live/studybuddy.top/cert.pem') + }, app) + .listen(port, () => console.log('Prod server started on ' + port)); +} else { + app.listen(port, () => console.log('Dev server started on ' + port)); +}