|
@@ -3,19 +3,19 @@ const db = require('../model/db');
|
|
|
const createFolderIsExist = require('../helpers/create-directory');
|
|
|
const PORT = process.env.PORT || 3000;
|
|
|
const APP_NAME = process.env.APP_NAME;
|
|
|
-const http = require('http');
|
|
|
+// const http = require('http');
|
|
|
|
|
|
-setInterval(() => {
|
|
|
- http
|
|
|
- .get(`http://${APP_NAME}.herokuapp.com`, function (res) {
|
|
|
- res.on('data', function (_chunk) {
|
|
|
- console.log('HEROKU RESPONSE: PINGED EVERY 25 MINUTES');
|
|
|
- });
|
|
|
- })
|
|
|
- .on('error', function (_err) {
|
|
|
- console.log('HEROKU RESPONSE: NOT PINGED');
|
|
|
- });
|
|
|
-}, 25 * 60 * 1000);
|
|
|
+// setInterval(() => {
|
|
|
+// http
|
|
|
+// .get(`http://${APP_NAME}.herokuapp.com`, function (res) {
|
|
|
+// res.on('data', function (_chunk) {
|
|
|
+// console.log('HEROKU RESPONSE: PINGED EVERY 25 MINUTES');
|
|
|
+// });
|
|
|
+// })
|
|
|
+// .on('error', function (_err) {
|
|
|
+// console.log('HEROKU RESPONSE: NOT PINGED');
|
|
|
+// });
|
|
|
+// }, 25 * 60 * 1000);
|
|
|
|
|
|
db.then(() => {
|
|
|
app.listen(PORT, async () => {
|