Skip to content

Commit d68ba36

Browse files
authored
Merge pull request #56 from CS3219-AY2324S1/api-gateway-service-and-dockerize
Api gateway service and dockerize
2 parents 77ee49a + 547663f commit d68ba36

File tree

14 files changed

+2725
-3
lines changed

14 files changed

+2725
-3
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
/MatchingService/node_modules
1313
/UserService/node_modules
1414
/UserService/javascript
15+
/ApiGatewayService/javascript
16+
/ApiGatewayService/node_modules
1517
/backend/javascript
1618
/.pnp
1719
.pnp.js

ApiGatewayService/Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Use an official Node.js runtime as a parent image
2+
FROM node:14
3+
4+
# Set the working directory in the container
5+
WORKDIR /usr/src/api-gateway
6+
7+
# Copy package.json and package-lock.json to the working directory
8+
COPY package*.json ./
9+
10+
# Install app dependencies
11+
RUN npm install
12+
13+
# Bundle your app source code into the container
14+
COPY . .
15+
16+
# Expose the port on which your API gateway will run
17+
EXPOSE 3001
18+
19+
# Define the command to start your API gateway
20+
CMD [ "npm", "run", "dev"]

0 commit comments

Comments
 (0)