fix(server): configuration page
This commit is contained in:
parent
d477de027a
commit
8be52a0237
@ -1,8 +1,8 @@
|
||||
import { Middleware, JSX } from '@txtdot/sdk';
|
||||
|
||||
const Highlight = new Middleware(
|
||||
'highlight',
|
||||
'Highlights code with highlight.js',
|
||||
'Highlight',
|
||||
'Highlights code with highlight.js only when needed',
|
||||
['*']
|
||||
);
|
||||
|
||||
|
@ -9,6 +9,7 @@ export default async function configurationRoute(fastify: FastifyInstance) {
|
||||
fastify.get('/configuration', { schema: indexSchema }, async (_, reply) => {
|
||||
return reply.view('/templates/configuration.ejs', {
|
||||
engines: distributor.engines_fallback,
|
||||
middlewares: distributor.middles_fallback,
|
||||
config,
|
||||
});
|
||||
});
|
||||
|
@ -42,6 +42,14 @@
|
||||
}
|
||||
%>
|
||||
</ol>
|
||||
<h2>Available middlewares</h2>
|
||||
<ol>
|
||||
<%
|
||||
for (const middleware of middlewares) {
|
||||
%><li><%= middleware.name %>: <%= middleware.description %></li><%
|
||||
}
|
||||
%>
|
||||
</ol>
|
||||
<h2>Available routes</h2>
|
||||
<%
|
||||
for (const route of config.dyn.routes) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user