Authored by 陈峰

commit

... ... @@ -28,6 +28,14 @@ app.use(function(req, res, next) {
next()
})
app.get('/', function(req, res) {
res.sendFile(path.join(__dirname, '/public/index.html'))
})
app.get(/\.html$/, function(req, res) {
res.sendFile(path.join(__dirname, '/public/index.html'))
})
app.use(routes);
// catch 404 and forward to error handler
... ...
... ... @@ -4,7 +4,8 @@
"private": true,
"scripts": {
"start": "node ./bin/www",
"dev": "nodemon"
"dev": "nodemon",
"prod": "git pull && pm2 restart yoho-dl-label"
},
"dependencies": {
"body-parser": "~1.13.2",
... ...
... ... @@ -5,12 +5,12 @@
<title>Slowpoke 系统</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link rel="stylesheet" href="/main.fd12991e0e8915e7339b.css">
<link rel="stylesheet" href="/main.003572b64945c6b9d78e.css">
</head>
<body>
<div id="app"></div>
<script type="text/javascript" src="/vendors.fd12991e0e8915e7339b.js"></script>
<script type="text/javascript" src="/vendors.003572b64945c6b9d78e.js"></script>
<script type="text/javascript" src="/main.js"></script>
</body>
... ...