Add Nightbot command documentation
This commit is contained in:
parent
a639e7c1ae
commit
2cdb407c69
2 changed files with 55 additions and 0 deletions
19
src/endpoints/files/docs.ts
Normal file
19
src/endpoints/files/docs.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { ServerRoute } from "@hapi/hapi";
|
||||
import path from "path";
|
||||
|
||||
const route: ServerRoute = {
|
||||
method: `GET`, path: `/docs/{path*}`,
|
||||
options: {
|
||||
files: {
|
||||
relativeTo: path.join(process.cwd(), `docs`),
|
||||
},
|
||||
},
|
||||
handler: {
|
||||
directory: {
|
||||
path: `.`,
|
||||
index: true,
|
||||
redirectToSlash: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
export default route;
|
||||
Loading…
Add table
Add a link
Reference in a new issue