Web API for code.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

17 lines
475 B

  1. import {ServerInstance} from './packages/fastify-utils-theoryofnekomata';
  2. import * as auth from './modules/auth/routes';
  3. import * as user from './modules/user/routes';
  4. import * as repo from './modules/repo/routes';
  5. export const addRoutes = (server: ServerInstance) => {
  6. auth.addRoutes(server);
  7. user.addRoutes(server);
  8. repo.addRoutes(server);
  9. server.get('/', async (request, reply) => {
  10. reply.send({
  11. routes: request.server.allStaticRoutes,
  12. });
  13. });
  14. }