diff options
author | HampusM <hampus@hampusmat.com> | 2021-07-23 14:02:57 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2021-07-23 14:02:57 +0200 |
commit | 22e44b4ef5f74f7058c01ade82ce14aaf9214f18 (patch) | |
tree | 2f24834b6d45af6f0c94357eafef5523b797d0cd /packages/server/src/types | |
parent | 998d566194cf901a2c927851f9b87c8b577d21a9 (diff) |
Cleaned and improved the backend
Put the initial Fastify stuff into a dedicated file, organized the types & made several improvements in the git http backend
Diffstat (limited to 'packages/server/src/types')
-rw-r--r-- | packages/server/src/types/fastify.d.ts | 11 | ||||
-rw-r--r-- | packages/server/src/types/index.d.ts | 9 |
2 files changed, 20 insertions, 0 deletions
diff --git a/packages/server/src/types/fastify.d.ts b/packages/server/src/types/fastify.d.ts new file mode 100644 index 0000000..ebaaac2 --- /dev/null +++ b/packages/server/src/types/fastify.d.ts @@ -0,0 +1,11 @@ +import { FastifyRequest, RequestGenericInterface } from "fastify"; +import { ReplyGenericInterface } from "fastify/types/reply"; + +export interface Request extends RequestGenericInterface { + Params: Record<string, string>, + Querystring: Record<string, string> +} + +export interface Route extends Request, ReplyGenericInterface {} + +export type CoolFastifyRequest = FastifyRequest<Route>;
\ No newline at end of file diff --git a/packages/server/src/types/index.d.ts b/packages/server/src/types/index.d.ts new file mode 100644 index 0000000..beb5f49 --- /dev/null +++ b/packages/server/src/types/index.d.ts @@ -0,0 +1,9 @@ +export type Settings = { + host: string, + port: number, + dev_port: number, + title: string, + about: string, + base_dir: string, + production: boolean +}
\ No newline at end of file |