From 6651215eeb6aadc4f101cff4278fc3f55ed24cc1 Mon Sep 17 00:00:00 2001 From: primakov Date: Sun, 19 May 2024 20:50:15 +0300 Subject: [PATCH] a bit refresh deployment --- Dockerfile | 6 ++++-- server/routers/r-and-m/index.js | 9 --------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index aba62dd..46280cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,16 @@ -FROM 'node:18' +FROM node:18 RUN mkdir -p /usr/src/app/server/ WORKDIR /usr/src/app/ COPY ./server /usr/src/app/server COPY ./package.json /usr/src/app/package.json +COPY ./package-lock.json /usr/src/app/package-lock.json COPY ./.serverrc.js /usr/src/app/.serverrc.js # COPY ./.env /usr/src/app/.env -RUN npm i --only=prod +# RUN npm i --omit=dev +RUN npm ci EXPOSE 8044 CMD ["npm", "run", "up:prod"] diff --git a/server/routers/r-and-m/index.js b/server/routers/r-and-m/index.js index 3b40460..a953b98 100644 --- a/server/routers/r-and-m/index.js +++ b/server/routers/r-and-m/index.js @@ -4,15 +4,6 @@ router.get('/landing-data', (request, response) => { response.send(require('./json/landing-data/success.json')); }); -router.post('/login', (req, response) => { - const { username, password } = req.body; - if (username === 'admin') { - response.send(require('./json/user/sitter.success.json')); - } else { - response.send(require('./json/landing-data/success.json')); - } -}); - router.post('/search', (req, res) => { const { search } = req.body;