Socialify

Folder ..

Viewing index.ts
15 lines (11 loc) • 461.0 B

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
import { FastifyRequest, FastifyReply, FastifyInstance, RegisterOptions } from 'fastify';

import ann from './ann';

const routes = async (fastify: FastifyInstance, options: RegisterOptions) => {
  // register news routes
  fastify.register(ann, { prefix: '/ann' });

  //default route message
  fastify.get('/', async (_request: FastifyRequest, reply: FastifyReply) => {
    reply.status(200).send('Welcome to Consumet News');
  });
};

export default routes;