리액트- #2

Jeongwon·2022년 1월 20일
0

리액트

목록 보기
1/6

index.js

const express = require('express')
const app = express()
const port = 5000

app.get('/', (req, res) => {
  res.send('Hello World!')
})

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

pacakage.json

{
  "name": "boiler-plate",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "start": "node index.js",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "jeongwon",
  "license": "ISC",
  "dependencies": {
    "express": "^4.17.2"
  }
}

1) 터미널에 npm run start 치기

2) localhost:5000

profile
(❁´◡`❁)

0개의 댓글

관련 채용 정보