fs读取文件
path将路径合并
const fs = require('fs')
const path = require('path')
fs.readFile('test.txt', (err, data) => {
if (err) {
console.log(err)
}
console.log(data.toString())
})
let domain = 'http://www.baidu.com'
let id = '22'
let result = path.join(domain, id)
console.log(result)