template initialization
All checks were successful
gitea/MERN_STACK_TEMPLATE/pipeline/head This commit looks good
All checks were successful
gitea/MERN_STACK_TEMPLATE/pipeline/head This commit looks good
This commit is contained in:
22
backend/.dockerignore
Normal file
22
backend/.dockerignore
Normal file
@ -0,0 +1,22 @@
|
||||
# Ignore node modules
|
||||
node_modules
|
||||
|
||||
# Logs
|
||||
npm-debug.log
|
||||
yarn-debug.log
|
||||
yarn-error.log
|
||||
|
||||
# Environment variables
|
||||
.env
|
||||
.env.local
|
||||
|
||||
# Editor configs
|
||||
.vscode
|
||||
.idea
|
||||
|
||||
# OS metadata
|
||||
.DS_Store
|
||||
|
||||
# Test files (if not needed in prod)
|
||||
__tests__/
|
||||
coverage/
|
6
backend/docker/dev.Dockerfile
Normal file
6
backend/docker/dev.Dockerfile
Normal file
@ -0,0 +1,6 @@
|
||||
FROM node:22.15.0
|
||||
WORKDIR /usr/src/app
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
COPY . .
|
||||
CMD ["npm", "run", "dev"]
|
1356
backend/package-lock.json
generated
Normal file
1356
backend/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
21
backend/package.json
Normal file
21
backend/package.json
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "backend",
|
||||
"version": "1.0.0",
|
||||
"main": "server.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"start": "node server.js",
|
||||
"dev": "nodemon server.js"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"type": "module",
|
||||
"license": "ISC",
|
||||
"description": "",
|
||||
"dependencies": {
|
||||
"dotenv": "^16.5.0",
|
||||
"express": "^5.1.0",
|
||||
"mongoose": "^8.14.1",
|
||||
"nodemon": "^3.1.10"
|
||||
}
|
||||
}
|
12
backend/server.js
Normal file
12
backend/server.js
Normal file
@ -0,0 +1,12 @@
|
||||
import express from "express";
|
||||
|
||||
const app = express();
|
||||
|
||||
app.get("/", (req, res) => {
|
||||
res.send("Hello World!");
|
||||
});
|
||||
|
||||
|
||||
app.listen(8080, () => {
|
||||
console.log("Server Started at 0.0.0.0:8080");
|
||||
});
|
Reference in New Issue
Block a user