Yes
All checks were successful
Build and Deploy Nuxt / build (push) Successful in 1m36s

This commit is contained in:
2026-03-17 00:22:54 +01:00
parent 44663ec051
commit 687a3c922c
18 changed files with 1573 additions and 43 deletions

3
backend/.env.example Normal file
View File

@@ -0,0 +1,3 @@
PORT=5000
DB_URI=mongodb://localhost:27017/
NODE_ENV=development

16
backend/.gitignore vendored Normal file
View File

@@ -0,0 +1,16 @@
# Node dependencies
node_modules
# Logs
logs
*.log
# Misc
.DS_Store
.fleet
.idea
# Local env files
.env
.env.*
!.env.example

1368
backend/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

18
backend/package.json Normal file
View File

@@ -0,0 +1,18 @@
{
"name": "backend",
"version": "1.0.0",
"description": "",
"license": "ISC",
"author": "",
"type": "commonjs",
"main": "src/index.js",
"scripts": {
"dev": "nodemon src/index.js"
},
"dependencies": {
"dotenv": "^17.3.1",
"express": "^5.2.1",
"mongoose": "^9.3.0",
"nodemon": "^3.1.14"
}
}

14
backend/src/db.js Normal file
View File

@@ -0,0 +1,14 @@
const mongoose = require("mongoose");
const connectDB = async () => {
try {
await mongoose.connect(process.env.DB_URI);
console.log("MongoDB connected");
} catch (error) {
console.error("MongoDB connection error:", error);
process.exit(1);
}
};
module.exports = connectDB;

16
backend/src/index.js Normal file
View File

@@ -0,0 +1,16 @@
const express = require("express");
require('dotenv').config();
const app = express();
const connectDB = require("./db");
// connect database
connectDB();
app.get("/", (req, res) => {
res.send("Hello from Proxmox container!");
});
app.listen(5000, () => {
console.log("Server running on port 5000");
});