# 安裝套件 ``` npm init -y npm i express npm i -D nodemon ``` ## index.js ```javascript= const express = require('express'); const app = express(); const port = 3000; app.get('/', (req, res) => { res.send('hello'); }); app.listen(port, () => { console.log('server start'); }); ``` # 修改npm script ```javascript= scripts: { "dev": "nodemon index.js" } ``` # 執行npm script ```shell= npm run dev ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up