- Dynamic Pages (MyPage)
- Uploading files to the Server FTP.
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user