File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 42
42
docker pull han95210/codesoom-hamill:${GITHUB_SHA::7}
43
43
docker tag han95210/codesoom-hamill:${GITHUB_SHA::7} codesoom-hamill
44
44
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
Original file line number Diff line number Diff line change 4
4
5
5
RUN npm install
6
6
7
- CMD ["node " , "src/server " ]
7
+ CMD ["npm " , "start " ]
Original file line number Diff line number Diff line change 1
1
const express = require ( 'express' ) ;
2
2
const app = express ( ) ;
3
+ const cors = require ( 'cors' ) ;
3
4
const bodyParser = require ( 'body-parser' ) ;
4
5
const port = process . env . PORT || 3001 ;
5
6
const route = require ( './routes/index' ) ;
6
7
8
+ app . use ( cors ( ) ) ;
7
9
app . use ( bodyParser . json ( ) ) ;
8
10
app . use ( '/api' , route ) ;
9
11
You can’t perform that action at this time.
0 commit comments