mirror of
https://gitee.com/docsifyjs/docsify.git
synced 2024-11-30 11:08:58 +08:00
864935bfc1
* feat: hash routing, close #2 * Fix router bug * Remove console * Add hash router docs * Improved scrolling on mobile * Add change log * Use hash router
13 lines
362 B
JavaScript
13 lines
362 B
JavaScript
var serveStatic = require('serve-static')
|
|
var http = require('http')
|
|
var fs = require('fs')
|
|
|
|
http.createServer(function (req, res) {
|
|
serveStatic('.')(req, res, function () {
|
|
res.writeHead(404, { 'Content-Type': 'text/html' })
|
|
res.end(fs.readFileSync('404.dev.html'))
|
|
})
|
|
}).listen(3000, '0.0.0.0')
|
|
|
|
console.log(`\nListening at http://0.0.0.0:3000\n`)
|