This repository has been archived by the owner on Mar 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add fastify as http engine * Change schema storage and processing * Set and update schema compiler * Add query dto decorator * Adjust controller for fastify * Adjust tests to new handling model * Ignore typings for test * Remove unused deps * Return send function * Rebase tests for reply body
- Loading branch information
Showing
25 changed files
with
285 additions
and
680 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,21 @@ | ||
import { Response as ERes, Request as EReq } from 'express'; | ||
import { Server, IncomingMessage, ServerResponse} from 'http' | ||
|
||
export { Request, Response, RequestHandler } from 'express'; | ||
export type Context = { | ||
request: EReq, | ||
response: ERes | ||
}; | ||
import { | ||
FastifyRequest, | ||
FastifyReply, | ||
RequestHandler as FastifyRequestHandler, | ||
FastifyMiddleware | ||
} from 'fastify'; | ||
|
||
export type RequestHandler = FastifyRequestHandler<IncomingMessage, ServerResponse>; | ||
|
||
export type RequestMiddleware = FastifyMiddleware<Server, IncomingMessage, ServerResponse>; | ||
|
||
export type Request = FastifyRequest<IncomingMessage>; | ||
|
||
export type Response = FastifyReply<ServerResponse>; | ||
|
||
export interface Context { | ||
request: Request; | ||
response: Response; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.