Skip to content

Commit 4c95abc

Browse files
authored
Merge pull request #4 from CodeSoom/week1/settings2
[Week1] settings2
2 parents 9d1ae3a + c1c166e commit 4c95abc

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ jobs:
4242
docker pull han95210/codesoom-hamill:${GITHUB_SHA::7}
4343
docker tag han95210/codesoom-hamill:${GITHUB_SHA::7} codesoom-hamill
4444
docker stop server
45-
docker run -d --rm --name server -p 80:3001 codesoom-hamill
45+
docker run -d --rm --name server -p 80:3000 codesoom-hamill

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ COPY . .
44

55
RUN npm install
66

7-
CMD ["node", "src/server"]
7+
CMD ["npm", "start"]

src/server.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
const express = require('express');
22
const app = express();
3+
const cors = require('cors');
34
const bodyParser = require('body-parser');
45
const port = process.env.PORT || 3001;
56
const route = require('./routes/index');
67

8+
app.use(cors());
79
app.use(bodyParser.json());
810
app.use('/api', route);
911

0 commit comments

Comments
 (0)