Move dashboard, add static dir
This commit is contained in:
parent
a61b5aab79
commit
b5edf2d6d4
3 changed files with 18 additions and 2 deletions
3
index.js
3
index.js
|
@ -19,6 +19,7 @@ if (!directory) {
|
|||
}
|
||||
|
||||
app.use('/b', express.static(directory))
|
||||
app.use(express.static(path.join(__dirname, 'static')))
|
||||
|
||||
app.listen(PORT, () => {
|
||||
console.log("Now listening on PORT: " + PORT)
|
||||
|
@ -39,7 +40,7 @@ app.get("/b*", (req, res) => {
|
|||
try {
|
||||
var dirContents = fs.readdirSync(absPath)
|
||||
} catch (error) {
|
||||
res.send("<p>404: not found!</p>")
|
||||
res.send(baseStart + "<h2>404: not found!</h2>" + baseEnd)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
15
static/dashboard/index.html
Normal file
15
static/dashboard/index.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Dashboard</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Upload</h2>
|
||||
<form action="/upload" enctype="multipart/form-data">
|
||||
<input type="text">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in a new issue