express-generator-typescript 3.0.1 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -89,16 +89,24 @@ The generated project is a small CRUD app for a `User` record. It shows how to s
|
|
|
89
89
|
The app uses a **layered** architecture, which suits a small CRUD app. If you plan to grow it, consider switching to a **domain-based** layout. The [Typescript Best Practices README](https://github.com/seanpmaxwell/Typescript-Best-Practices/tree/main?tab=readme-ov-file#architecture) explains both patterns.
|
|
90
90
|
|
|
91
91
|
Layers explained:
|
|
92
|
-
```
|
|
93
|
-
-
|
|
94
|
-
|
|
92
|
+
```md
|
|
93
|
+
- config/ → .env files for each environment
|
|
94
|
+
- src/ → Source code
|
|
95
|
+
- common/ → Shared code
|
|
96
|
+
- classes/ → Shared classes (e.g. route errors)
|
|
95
97
|
- constants/
|
|
96
|
-
- Paths.ts
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
98
|
+
- Paths.ts → Single source of truth for all API routes
|
|
99
|
+
- types/ → Shared types
|
|
100
|
+
- utils/ → Shared helper functions
|
|
101
|
+
- entities/ → Describe and handle database records (one folder per entity)
|
|
102
|
+
- routes/ → Read and validate values from Express requests; send responses
|
|
103
|
+
- services/ → Business logic (where everything comes together)
|
|
104
|
+
- repos/ → Talk to the database
|
|
105
|
+
- public/ → Front-end scripts and styles
|
|
106
|
+
- views/ → HTML pages
|
|
107
|
+
- main.ts → Starts the server
|
|
108
|
+
- server.ts → Sets up the Express app
|
|
109
|
+
- tests/ → Tests
|
|
102
110
|
```
|
|
103
111
|
|
|
104
112
|
<p align="center">· · ·</p>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "express-generator-typescript",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"description": "Generate new Express applications similar to express-generate which but sets it up to use TypeScript instead",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"commit": "git add -A && git commit -m \"dev commit\"",
|