update db

This commit is contained in:
shoopea 2024-11-16 12:31:54 +01:00
parent 8046a5cd15
commit 323b050cfc
2 changed files with 2 additions and 1 deletions

View File

@ -11,5 +11,6 @@ RUN npm install -g nodemon
# RUN npm ci --omit=dev # RUN npm ci --omit=dev
# Bundle app source # Bundle app source
COPY . . COPY . .
RUN mkdir -p /usr/src/app/db
EXPOSE 3000 EXPOSE 3000
CMD [ "node", "app.js" ] CMD [ "node", "app.js" ]

2
db.js
View File

@ -1,7 +1,7 @@
const Database = require('better-sqlite3'); const Database = require('better-sqlite3');
const bcrypt = require('bcrypt'); const bcrypt = require('bcrypt');
const better_sqlite_client = new Database('cspanel.db'); const better_sqlite_client = new Database('./db/cspanel.db');
better_sqlite_client.exec(` better_sqlite_client.exec(`
CREATE TABLE IF NOT EXISTS servers ( CREATE TABLE IF NOT EXISTS servers (