@@ -8,9 +8,10 @@ This is a starter project to create Deno RESTful API using oak. [oak](https://gi
88 1 ) [ Setup] ( #setup )
99 2 ) [ Migrations] ( #migrations )
1010 3 ) [ Modules] ( #modules )
11- 4 ) [ Contributing] ( #contributing )
12- 5 ) [ Contributors] ( #contributors )
13- 6 ) [ Roadmap] ( #roadmap )
11+ 4 ) [ Project Layout] ( #project-layout )
12+ 5 ) [ Contributing] ( #contributing )
13+ 6 ) [ Contributors] ( #contributors )
14+ 7 ) [ Roadmap] ( #roadmap )
1415
1516## Setup
1617We can run the project ** with/ without Docker** .
@@ -62,6 +63,31 @@ deno run --allow-net --allow-read --allow-write https://deno.land/x/nessie/cli.t
6263|[[email protected] ](https://deno.land/x/[email protected] /mod.ts)|MySQL driver for Deno| 6364|[nessie](https://deno.land/x/nessie/mod.ts)| DB migration tool for Deno|
6465
66+ ### Project Layout
67+
68+ ```
69+ .
70+ ├── .env (Make sure to create this file from given .env.example)
71+ ├── config
72+ | ├── config.ts (contains config object with env vars as attribute)
73+ ├── db
74+ | ├── db.ts (contains DB connection object)
75+ ├── middlewares
76+ | ├── error.middleware.ts (error handler middleware)
77+ | ├── logger.middleware.ts (request logger)
78+ | ├── timing.middleware.ts (timing middleware logging request dispatch time)
79+ | ├── middlewares.ts (exports all middlewares)
80+ ├── migrations (contains DB migration scripts)
81+ ├── repositories
82+ | ├── user.repository.ts (contains repository methods for user table)
83+ ├── routes
84+ | ├── user.routes.ts (router handler methods for user routes)
85+ | ├── routes.ts (bind router handlers with app routes)
86+ ├── app.ts (Contains application server)
87+ └── nessie.config.ts (DB configuration for nessie migration)
88+ ```
89+
90+
6591## Middlewares
6692- Middlewares are defined in the `middlewares/` folder.
6793- Sample middleware added
0 commit comments