Update .gitignore

This commit is contained in:
X4Lo committed 2026-06-23 04:02:37 +01:00
1 parent d8b95cb3e9
commit 89deb869ab
2 files changed
+28 -27

No files matched your search

+1
View File
@@ -11,6 +11,7 @@ environment.ts
/backend/.env /backend/.env
circular-dependencies.png circular-dependencies.png
.agents/skills .agents/skills
auto_puller.py
# Compiled output # Compiled output
.angular .angular
+27 -27
View File
@@ -1,36 +1,36 @@
const express = require("express"); const express = require('express');
const bodyParser = require("body-parser"); const bodyParser = require('body-parser');
const routes = require("./routes/routes.js"); const routes = require('./routes/routes.js');
const sequelize = require("./config/database.js"); const sequelize = require('./config/database.js');
const app = express(); const app = express();
// Global error handling for unhandled promise rejections // Global error handling for unhandled promise rejections
process.on("unhandledRejection", (reason, promise) => { process.on('unhandledRejection', (reason, promise) => {
console.log("Unhandled Rejection at:", promise, "reason:", reason); console.log('Unhandled Rejection at:', promise, 'reason:', reason);
// Application specific logging, throwing an error, or other logic here // Application specific logging, throwing an error, or other logic here
}); });
// Global error handling for uncaught exceptions // Global error handling for uncaught exceptions
process.on("uncaughtException", (error) => { process.on('uncaughtException', (error) => {
console.log("Uncaught Exception:", error); console.log('Uncaught Exception:', error);
// Application specific logging, throwing an error, or other logic here // Application specific logging, throwing an error, or other logic here
process.exit(1); // Exit the process to avoid undefined state process.exit(1); // Exit the process to avoid undefined state
}); });
const relations = require("./config/relations.js"); const relations = require('./config/relations.js');
const sequelizeHooks = require("./config/sequelizeHooks.js"); const sequelizeHooks = require('./config/sequelizeHooks.js');
const { initializeData } = require("./config/dataInitializer.js"); const { initializeData } = require('./config/dataInitializer.js');
const killerRouter = require("./routes/killer.routes.js"); const killerRouter = require('./routes/killer.routes.js');
const errorHandler = require("./middleware/errorHandler"); const errorHandler = require('./middleware/errorHandler');
const configService = require("./services/configService.js"); const configService = require('./services/configService.js');
const { logToFile } = require("./services/logService.js"); const { logToFile } = require('./services/logService.js');
const { generatePreview } = require("./services/mediaService.js"); const { generatePreview } = require('./services/mediaService.js');
// ? variables // ? variables
let settings = configService.getSettings(); let settings = configService.getSettings();
const PORT = settings["backPort"] || 4000; const PORT = settings['backPort'] || 4000;
const parrentProcess = JSON.parse(process.env.PARENT_PROCESS || "{}"); const parrentProcess = JSON.parse(process.env.PARENT_PROCESS || '{}');
// ? Middleware // ? Middleware
app.use(bodyParser.json()); // for parsing application/json app.use(bodyParser.json()); // for parsing application/json
@@ -38,31 +38,31 @@ app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x
// * CORS Middleware to allow requests from any origin // * CORS Middleware to allow requests from any origin
app.use((req, res, next) => { app.use((req, res, next) => {
res.header("Access-Control-Allow-Origin", "*"); res.header('Access-Control-Allow-Origin', '*');
res.header( res.header(
"Access-Control-Allow-Headers", 'Access-Control-Allow-Headers',
"Origin, X-Requested-With, Content-Type, Accept, Authorization", 'Origin, X-Requested-With, Content-Type, Accept, Authorization',
); );
if (req.method === "OPTIONS") { if (req.method === 'OPTIONS') {
res.header("Access-Control-Allow-Methods", "PUT, POST, PATCH, DELETE, GET"); res.header('Access-Control-Allow-Methods', 'PUT, POST, PATCH, DELETE, GET');
return res.status(200).json({}); return res.status(200).json({});
} }
next(); next();
}); });
// ? other api routes // ? other api routes
app.use("/api/v1", routes); app.use('/api/v1', routes);
// ? Error handling middleware // ? Error handling middleware
app.use(errorHandler); app.use(errorHandler);
// ? KILLER ROUTE: used to crash the backend // ? KILLER ROUTE: used to crash the backend
app.use("/killer", killerRouter); app.use('/killer', killerRouter);
// * Start the server // * Start the server
const doUpdate = false; const doUpdate = false;
const doForce = false; const doForce = false;
console.log("Server started"); console.log('Server started');
console.log(`Syncing database schema...`); console.log(`Syncing database schema...`);
sequelize sequelize
// .sync({force: true}) // will drop all tables and recreate them. // .sync({force: true}) // will drop all tables and recreate them.
@@ -76,6 +76,6 @@ sequelize
}); });
}) })
.catch((err) => { .catch((err) => {
console.log("____________SEQUELIZE SYNC ERROR____________"); console.log('____________SEQUELIZE SYNC ERROR____________');
console.log(err); console.log(err);
}); });