
도커 nodejs 실습 프로젝트
·
docker
$ npm init -y프로젝트 초기화$ npm i express웹 애플리케이션 프레임워크 설치(express)index.jsconst express = require('express');const app = express();app.get('/', (req, res) => { res.send('🐳 Dream Coding in Docker! 🐳');});app.listen(8080, () => console.log('Server is running 🤖')); $ node index.js백엔드 서버 구동 컨테이너를 만들기 위해서 해야할 것1. Dockerfile 생성FROM node:16-alpineWORKDIR /appCOPY package.json package-lock.json ./## n..