forked from bro-students/multy-stub
a bit refresh deployment
This commit is contained in:
parent
80f8cef142
commit
6651215eeb
@ -1,14 +1,16 @@
|
|||||||
FROM 'node:18'
|
FROM node:18
|
||||||
|
|
||||||
RUN mkdir -p /usr/src/app/server/
|
RUN mkdir -p /usr/src/app/server/
|
||||||
WORKDIR /usr/src/app/
|
WORKDIR /usr/src/app/
|
||||||
|
|
||||||
COPY ./server /usr/src/app/server
|
COPY ./server /usr/src/app/server
|
||||||
COPY ./package.json /usr/src/app/package.json
|
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 ./.serverrc.js /usr/src/app/.serverrc.js
|
||||||
# COPY ./.env /usr/src/app/.env
|
# COPY ./.env /usr/src/app/.env
|
||||||
|
|
||||||
RUN npm i --only=prod
|
# RUN npm i --omit=dev
|
||||||
|
RUN npm ci
|
||||||
EXPOSE 8044
|
EXPOSE 8044
|
||||||
|
|
||||||
CMD ["npm", "run", "up:prod"]
|
CMD ["npm", "run", "up:prod"]
|
||||||
|
@ -4,15 +4,6 @@ router.get('/landing-data', (request, response) => {
|
|||||||
response.send(require('./json/landing-data/success.json'));
|
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) => {
|
router.post('/search', (req, res) => {
|
||||||
const { search } = req.body;
|
const { search } = req.body;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user