diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..6c86446 Binary files /dev/null and b/public/favicon.ico differ diff --git a/server.js b/server.js index f790a37..8c8e22f 100644 --- a/server.js +++ b/server.js @@ -9,9 +9,10 @@ mongoose.connect(MONGDB_URL, (error) => { } }) const app = express() +app.use(express.static('public')) app.set('view engine', 'pug') app.get('/', async (req, res) => { - res.render('index', { title: 'hello, world!' }) + res.render('index', { title: '文件分享服务器' }) }) const server = app.listen(SERVER_PORT, SERVER_HOST, () => { console.info(`server is running at http://${SERVER_HOST}:${SERVER_PORT}`)