react-express-mongodb: clean frontend code
- apply prettier style on every js file - remove mutation on immutable variables - remove wrapper on top of axios - fix form handling - remove useless port definition in dockerfile Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
This commit is contained in:
committed by
Guillaume Lours
parent
be7f09b6ba
commit
e5828ad1bf
@@ -1,15 +1,9 @@
|
||||
# Create image based on the official Node image from dockerhub
|
||||
FROM node:13.13.0-stretch
|
||||
|
||||
#Argument that is passed from docer-compose.yaml file
|
||||
ARG FRONT_END_PORT
|
||||
FROM node:lts-buster-slim
|
||||
|
||||
# Create app directory
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
#Echo the argument to check passed argument loaded here correctly
|
||||
RUN echo "Argument port is : $FRONT_END_PORT"
|
||||
|
||||
# Copy dependency definitions
|
||||
COPY package.json /usr/src/app
|
||||
COPY package-lock.json /usr/src/app
|
||||
@@ -24,7 +18,7 @@ RUN npm ci
|
||||
COPY . /usr/src/app
|
||||
|
||||
# Expose the port the app runs in
|
||||
EXPOSE ${FRONT_END_PORT}
|
||||
EXPOSE 3000
|
||||
|
||||
# Serve the app
|
||||
CMD ["npm", "start"]
|
||||
|
Reference in New Issue
Block a user