add new config

This commit is contained in:
Ryahn 2025-01-27 21:08:44 -05:00
parent 9ca61e74ec
commit 108722f4c6
3 changed files with 9 additions and 3 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
node_modules
database.js
haraka.js
main.js
*.log

6
app.js
View File

@ -6,6 +6,7 @@ const knexConfig = require('./src/config/database');
const MessageService = require('./src/email_server/services/MessageService');
const swaggerJsdoc = require('swagger-jsdoc');
const swaggerUi = require('swagger-ui-express');
const config = require('./src/config/main');
const swaggerOptions = {
definition: {
@ -60,7 +61,6 @@ cron.schedule('0 0 * * *', async () => {
}
});
const PORT = 3000;
app.listen(PORT, () => {
console.log(`API server running on port ${PORT}`);
app.listen(config.site.port, () => {
console.log(`API server running on port ${config.site.port}`);
});

View File

@ -0,0 +1,5 @@
module.exports = {
site: {
port: 3000,
}
};