- Dynamic Pages (MyPage)

- Uploading files to the Server FTP.
This commit is contained in:
Paolo Arena
2019-12-07 00:20:06 +01:00
parent b92655c2e5
commit 9d0e6136ac
6 changed files with 235 additions and 6 deletions

View File

@@ -3,7 +3,9 @@ require('./config/config');
const _ = require('lodash');
const cors = require('cors');
var fs = require('fs');
const fs = require('fs');
//const throttle = require('express-throttle-bandwidth');
const port = process.env.PORT;
@@ -16,6 +18,7 @@ const sendemail = require('./sendemail');
const cron = require('node-cron');
i18n = require("i18n");
if ((process.env.NODE_ENV === 'production') || (process.env.NODE_ENV === 'test')) {
@@ -36,6 +39,7 @@ require('./models/booking');
require('./models/sendmsg');
require('./models/mailinglist');
require('./models/newstosent');
require('./models/mypage');
const mysql_func = require('./mysql/mysql_func');
@@ -152,6 +156,14 @@ if ((process.env.NODE_ENV === 'production') || (process.env.NODE_ENV === 'test')
httpServer.listen(port);
}
// app.use(throttle(1024 * 128)); // throttling bandwidth
// app.use((req, res, next) => {
// res.header('Access-Control-Allow-Origin', '*')
// res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept')
// next()
// });
if (process.env.PROD !== 1) {
// testmsgwebpush();
// sendemail.testemail('2', 'it');