feat(api): add backend api with express and sqlite

This commit is contained in:
Tuan-Dat Tran
2026-02-23 13:47:44 +01:00
parent 7f06ee7f53
commit 00af8862d3
4 changed files with 70 additions and 0 deletions

18
backend/Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM node:20-slim
WORKDIR /app
RUN apt-get update && apt-get install -y python3 make g++ && rm -rf /var/lib/apt/lists/*
COPY package*.json ./
RUN npm install --omit=dev --ignore-scripts && \
cd node_modules/better-sqlite3 && \
npm run build-release
COPY . .
RUN mkdir -p /app/data
EXPOSE 3001
CMD ["node", "server.js"]