From 22e44b4ef5f74f7058c01ade82ce14aaf9214f18 Mon Sep 17 00:00:00 2001 From: HampusM Date: Fri, 23 Jul 2021 14:02:57 +0200 Subject: 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 --- packages/server/src/types/fastify.d.ts | 11 +++++++++++ packages/server/src/types/index.d.ts | 9 +++++++++ 2 files changed, 20 insertions(+) create mode 100644 packages/server/src/types/fastify.d.ts create mode 100644 packages/server/src/types/index.d.ts (limited to 'packages/server/src/types') 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, + Querystring: Record +} + +export interface Route extends Request, ReplyGenericInterface {} + +export type CoolFastifyRequest = FastifyRequest; \ 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 -- cgit v1.2.3-18-g5258