move to src

This commit is contained in:
Alex Holliday committed 2025-07-25 15:33:48 -07:00
1 parent acc910cbc0
commit 1c47c8ce2c
127 files changed
+71 -19

No files matched your search

+1 -1
View File
@@ -10,4 +10,4 @@ COPY ./server/ ./
EXPOSE 52345
CMD ["node", "index.js"]
CMD ["node", "src/index.js"]
+1 -1
View File
@@ -22,4 +22,4 @@ RUN chmod +x ./scripts/inject-vars.sh
EXPOSE 52345
CMD ./scripts/inject-vars.sh && node ./index.js
CMD ./scripts/inject-vars.sh && node ./src/index.js
+1 -1
View File
@@ -22,4 +22,4 @@ RUN chmod +x ./scripts/inject-vars.sh
EXPOSE 52345
CMD ./scripts/inject-vars.sh && node ./index.js
CMD ./scripts/inject-vars.sh && node ./src/index.js
+2 -2
View File
@@ -12,10 +12,10 @@ declare -A services=(
)
for service in "${!services[@]}"; do
docker buildx build \
--platform linux/amd64,linux/arm64 \
docker build \
-f "${services[$service]}" \
-t "$service" \
.
if [ $? -ne 0 ]; then
echo "Error building $service image. Exiting..."
+1 -1
View File
@@ -10,4 +10,4 @@ COPY ./server/ ./
EXPOSE 52345
CMD ["node", "index.js"]
CMD ["node", "src/index.js"]
+1 -1
View File
@@ -12,4 +12,4 @@ COPY ./server ./
EXPOSE 52345
CMD ["node", "index.js"]
CMD ["node", "src/index.js"]
+1 -1
View File
@@ -12,4 +12,4 @@ COPY ./server ./
EXPOSE 52345
CMD ["node", "index.js"]
CMD ["node", "src/index.js"]
Executable → Regular
+5 -5
View File
@@ -1,14 +1,14 @@
import { initializeServices } from "./config/services.js";
import { initializeControllers } from "./config/controllers.js";
import { createApp } from "./app.js";
import { initializeServices } from "./src/config/services.js";
import { initializeControllers } from "./src/config/controllers.js";
import { createApp } from "./src/app.js";
import { initShutdownListener } from "./shutdown.js";
import logger from "./utils/logger.js";
import { fileURLToPath } from "url";
import path from "path";
import fs from "fs";
import SettingsService from "./service/system/settingsService.js";
import AppSettings from "./db/models/AppSettings.js";
import SettingsService from "./src/service/system/settingsService.js";
import AppSettings from "./src/db/models/AppSettings.js";
const SERVICE_NAME = "Server";
+2 -2
View File
@@ -1,5 +1,5 @@
{
"ignore": ["locales/*", "*.log", "node_modules/*"],
"watch": ["*.js", "*.json"],
"ignore": ["src/locales/*", "*.log", "node_modules/*"],
"watch": ["src/**/*.js", "*.json"],
"ext": "js,json"
}
+1 -1
View File
@@ -6,7 +6,7 @@
"type": "module",
"scripts": {
"test": "c8 mocha",
"dev": "nodemon index.js",
"dev": "nodemon src/index.js",
"lint": "eslint .",
"lint-fix": "eslint --fix .",
"format": "prettier --write .",
-1
View File
@@ -1 +0,0 @@
export const startServer = () => {};
View File
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,7 +1,5 @@
import mongoose from "mongoose";
import { BaseCheckSchema } from "./Check.js";
import logger from "../../utils/logger.js";
import { time } from "console";
const AuditSchema = mongoose.Schema({
id: { type: String, required: true },
title: { type: String, required: true },
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+55
View File
@@ -0,0 +1,55 @@
import { initializeServices } from "./config/services.js";
import { initializeControllers } from "./config/controllers.js";
import { createApp } from "./app.js";
import { initShutdownListener } from "./shutdown.js";
import logger from "./utils/logger.js";
import { fileURLToPath } from "url";
import path from "path";
import fs from "fs";
import SettingsService from "./service/system/settingsService.js";
import AppSettings from "./db/models/AppSettings.js";
const SERVICE_NAME = "Server";
const startApp = async () => {
// FE path
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const openApiSpec = JSON.parse(fs.readFileSync(path.join(__dirname, "../openapi.json"), "utf8"));
const frontendPath = path.join(__dirname, "public");
// Create services
const settingsService = new SettingsService(AppSettings);
const appSettings = settingsService.loadSettings();
// Initialize services
const services = await initializeServices(appSettings, settingsService);
// Initialize controllers
const controllers = initializeControllers(services);
const app = createApp({
services,
controllers,
appSettings,
frontendPath,
openApiSpec,
});
const port = appSettings.port || 52345;
const server = app.listen(port, () => {
logger.info({ message: `Server started on port:${port}` });
});
initShutdownListener(server, services);
};
startApp().catch((error) => {
logger.error({
message: error.message,
service: SERVICE_NAME,
method: "startApp",
stack: error.stack,
});
process.exit(1);
});
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 127 files, more files were not shown because too many files have changed in this diff. Show more