Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
gotoweb committed Nov 2, 2021
0 parents commit 459c25d
Show file tree
Hide file tree
Showing 10 changed files with 976 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## 실행

`docker compose up` 으로 실행한 후, http://localhost 로 접속하세요.

## 종료

`docker compose down` 으로 종료하세요.

## 뭔가 바꾼 것을 적용하고 싶을 때

`docker compose build``docker compose up`을 실행하세요.
7 changes: 7 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node:16-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 80
CMD ["node", "app.js"]
13 changes: 13 additions & 0 deletions backend/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const express = require('express')
const cors = require('cors')
const app = express()
app.use(cors())
const port = 80

app.get('/', (req, res) => {
res.send('hello from server')
})

app.listen(port, () => {
console.log(`Example app listening at http://localhost:${port}`)
})
Loading

0 comments on commit 459c25d

Please sign in to comment.