diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c39f69a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM node:20 + +COPY ./src /app +WORKDIR /app +RUN npm install + +CMD node app.js \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..989ae16 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +version: "3.9" +services: + app: + build: + context: . + ports: + - 8080:8080 \ No newline at end of file diff --git a/src/app.js b/src/app.js index 3d30938..8dc7c84 100755 --- a/src/app.js +++ b/src/app.js @@ -236,7 +236,7 @@ let handlers = [ let user = conn.session.get('user') let uid = conn.session.get('id') let htmlParams = {} - let params = qs.parse(conn.location.search.substring(1)) + let params = qs.parse(conn.location.search?.substring(1)) let q = params.q || '' let sql diff --git a/src/package.json b/src/package.json index 3eabcde..b5392e7 100755 --- a/src/package.json +++ b/src/package.json @@ -12,7 +12,7 @@ "author": "Yosuke HASEGAWA", "license": "MIT", "dependencies": { - "libxmljs": "^0.18.7", - "sqlite3": "^3.1.8" + "libxmljs": "^1.0.11", + "sqlite3": "^5.1.7" } }