2022-07-06 09:02:36 +00:00
|
|
|
import { FastifyPluginAsync } from 'fastify';
|
|
|
|
|
import { traefikConfiguration, traefikOtherConfiguration } from './handlers';
|
2022-07-14 12:47:26 +00:00
|
|
|
import { TraefikOtherConfiguration } from './types';
|
2022-07-06 09:02:36 +00:00
|
|
|
|
2022-07-14 12:47:26 +00:00
|
|
|
const root: FastifyPluginAsync = async (fastify): Promise<void> => {
|
2022-07-06 09:02:36 +00:00
|
|
|
fastify.get('/main.json', async (request, reply) => traefikConfiguration(request, reply));
|
2022-07-14 12:47:26 +00:00
|
|
|
fastify.get<TraefikOtherConfiguration>('/other.json', async (request, reply) => traefikOtherConfiguration(request));
|
2022-07-06 09:02:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default root;
|