File tree Expand file tree Collapse file tree 6 files changed +1863
-0
lines changed Expand file tree Collapse file tree 6 files changed +1863
-0
lines changed Original file line number Diff line number Diff line change
1
+ Dockerfile
2
+ .dockerignore
3
+ node_modules
4
+ npm-debug.log
5
+ dist
Original file line number Diff line number Diff line change
1
+ /node_modules
2
+ .env.dev
3
+ /dist
Original file line number Diff line number Diff line change
1
+ FROM node:18.16.0-alpine as base
2
+
3
+ # Copy package.json and package-lock.json
4
+ COPY package*.json ./
5
+
6
+ # Install any dependencies
7
+ RUN npm install
8
+
9
+ # Bundle app source inside the Docker image
10
+ COPY src ./src
11
+
12
+ COPY tsconfig.json ./tsconfig.json
13
+
14
+ RUN npm run build
15
+
16
+ # Make port 3001 available to the world outside this container
17
+ ENV PORT=4001
18
+
19
+ EXPOSE ${PORT}
20
+
21
+ # Define the command to run your app
22
+ CMD ["npm" , "start" ]
Original file line number Diff line number Diff line change
1
+ # Question Service
2
+
3
+ ## Setup
4
+
5
+ Run the following command to install the dependencies
6
+
7
+ ``` bash
8
+ docker build -t question-service . --no-cache
9
+ docker run -p 4001:4001 --env-file .env.dev question-service
10
+ ```
11
+
12
+ ## Routes Endpoint
13
+
14
+ - GET /questions/ - get all questions
15
+ - GET /userQuestions/ - get all questions of a user
You can’t perform that action at this time.
0 commit comments