This commit is contained in:
2026-03-19 16:12:22 +07:00
parent 39b0358b08
commit b7e8450357
11 changed files with 101 additions and 68 deletions

View File

@@ -1,8 +0,0 @@
NODE_ENV=development
PORT=4000
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/app_admin
SESSION_SECRET=change-me
SESSION_NAME=pgcc.sid
ALLOWED_ORIGIN=http://localhost:5173
POSTGRES_CONTAINER_NAME=pg-control-postgres
COOKIE_SECURE=false

View File

@@ -1,22 +0,0 @@
FROM node:22-alpine AS build
WORKDIR /app
COPY package.json package.json
COPY tsconfig.json tsconfig.json
RUN npm install
COPY src src
RUN npm run build
FROM node:22-alpine
WORKDIR /app
COPY --from=build /app/package.json package.json
COPY --from=build /app/node_modules node_modules
COPY --from=build /app/dist dist
EXPOSE 4000
CMD ["npm", "run", "start"]

View File

@@ -1,34 +0,0 @@
{
"name": "@pg-control/backend",
"version": "1.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "tsx watch src/server.ts",
"build": "tsc -p tsconfig.json",
"start": "node dist/server.js"
},
"dependencies": {
"bcryptjs": "^2.4.3",
"connect-pg-simple": "^10.0.0",
"cors": "^2.8.5",
"dockerode": "^4.0.7",
"dotenv": "^16.4.5",
"express": "^4.19.2",
"express-rate-limit": "^7.4.0",
"express-session": "^1.18.0",
"helmet": "^7.1.0",
"pg": "^8.11.5",
"zod": "^3.23.8"
},
"devDependencies": {
"@types/bcryptjs": "^2.4.6",
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"@types/express-session": "^1.18.0",
"@types/node": "^22.10.1",
"@types/pg": "^8.11.6",
"tsx": "^4.19.2",
"typescript": "^5.7.2"
}
}

View File

@@ -1,20 +0,0 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"outDir": "dist",
"rootDir": "src",
"strict": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"types": [
"node"
]
},
"include": [
"src"
]
}