node.js 初级配置
const express = require('express')
const path = require('path')
const app = express()
app.use(express.static(path.join(__dirname, 'public')))//存放静态文件路径
console.log(__dirname)
app.listen(8888, () => {
console.log('App listening at port 8888')
})
//访问127.0.0.1:8888渲染public下index.html文件