mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-25 22:22:51 +09:00
oops
This commit is contained in:
parent
af1a533d13
commit
d68cc702a5
@ -4,18 +4,20 @@
|
|||||||
|
|
||||||
import * as express from 'express';
|
import * as express from 'express';
|
||||||
|
|
||||||
|
const docs = `${__dirname}/../../client/docs/`;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Init app
|
* Init app
|
||||||
*/
|
*/
|
||||||
const app = express();
|
const app = express();
|
||||||
app.disable('x-powered-by');
|
app.disable('x-powered-by');
|
||||||
|
|
||||||
app.use('/assets', express.static(`${__dirname}/assets`));
|
app.use('/assets', express.static(`${docs}/assets`));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Routing
|
* Routing
|
||||||
*/
|
*/
|
||||||
app.get(/^\/([a-z_\-\/]+?)$/, (req, res) =>
|
app.get(/^\/([a-z_\-\/]+?)$/, (req, res) =>
|
||||||
res.sendFile(`${__dirname}/${req.params[0]}.html`));
|
res.sendFile(`${docs}/${req.params[0]}.html`));
|
||||||
|
|
||||||
module.exports = app;
|
module.exports = app;
|
@ -17,7 +17,7 @@ const client = `${__dirname}/../../client/`;
|
|||||||
const app = express();
|
const app = express();
|
||||||
app.disable('x-powered-by');
|
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.urlencoded({ extended: true }));
|
||||||
app.use(bodyParser.json({
|
app.use(bodyParser.json({
|
||||||
|
Loading…
Reference in New Issue
Block a user