patch index.html
parent
b91986c3ed
commit
e2db34a6b2
4
index.js
4
index.js
|
@ -74,6 +74,10 @@ function createServer() {
|
||||||
|
|
||||||
pathname = decode(pathname) || 'index.html'
|
pathname = decode(pathname) || 'index.html'
|
||||||
|
|
||||||
|
if (pathname.endsWith('/')) {
|
||||||
|
pathname += 'index.html'
|
||||||
|
}
|
||||||
|
|
||||||
let file = join(root, pathname)
|
let file = join(root, pathname)
|
||||||
let stat = fs.stat(file)
|
let stat = fs.stat(file)
|
||||||
let ext = pathname.split('.').pop()
|
let ext = pathname.split('.').pop()
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "simple-http",
|
"name": "simple-http",
|
||||||
"displayName": "simple http",
|
"displayName": "simple http",
|
||||||
"description": "🔥 简单的http服务器, 方便临时调试html",
|
"description": "🔥 简单的http服务器, 方便临时调试html",
|
||||||
"version": "1.2.1",
|
"version": "1.2.2",
|
||||||
"publisher": "yutent",
|
"publisher": "yutent",
|
||||||
"author": "Yutent [@yutent]",
|
"author": "Yutent [@yutent]",
|
||||||
"icon": "logo.png",
|
"icon": "logo.png",
|
||||||
|
|
Loading…
Reference in New Issue