1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-13 06:08:58 +09:00
This commit is contained in:
syuilo 2018-03-29 20:50:45 +09:00
parent af1a533d13
commit d68cc702a5
2 changed files with 5 additions and 3 deletions

View File

@ -4,18 +4,20 @@
import * as express from 'express';
const docs = `${__dirname}/../../client/docs/`;
/**
* Init app
*/
const app = express();
app.disable('x-powered-by');
app.use('/assets', express.static(`${__dirname}/assets`));
app.use('/assets', express.static(`${docs}/assets`));
/**
* Routing
*/
app.get(/^\/([a-z_\-\/]+?)$/, (req, res) =>
res.sendFile(`${__dirname}/${req.params[0]}.html`));
res.sendFile(`${docs}/${req.params[0]}.html`));
module.exports = app;

View File

@ -17,7 +17,7 @@ const client = `${__dirname}/../../client/`;
const app = express();
app.disable('x-powered-by');
app.use('/docs', require('./docs/server'));
app.use('/docs', require('./docs'));
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json({