Commit af9a1e7
authored
feat: typescript-express server template (#324)
introduces a second server template, `typescript-express`
**Tasks**
- [x] Template
- [x] Runtime
- [x] Integration tests
- [x] Existing E2E tests
- [x] Additional E2E tests
- [x] Documentation
- [x] Review
**Why Express**
`express` is one of the most popular server frameworks for NodeJS,
getting approximately 10x as many weekly downloads as `koa`
Its also quite similar to `koa` making it a good candidate for the
second server template.
This makes it somewhat less interesting to implement, compared to other
options like `nextjs` (#152) but also means that its a good way to
prompt refactors like #316 without requiring a bunch of new
functionality.
**Runtime**
It's clear at this point that there is a lot of duplicated code between
all the runtimes. I like keeping the separate runtime packages for
several reasons:
- Dependency declaration / management is cleaner
- NPM download trends can function as a rough proxy for adoption / usage
_(although private caching registries cause this to under-report
significantly)_
It probably makes sense to introduce a `typescript-runtime-common`
package soon.
**Approach**
The approach ends up looking near identical to the `typescript-koa`
template, in terms of the end developer experience. This is particularly
reinforced by the E2E tests and how little difference exists between the
two implementations.1 parent f529387 commit af9a1e7
File tree
63 files changed
+301503
-48
lines changed- e2e
- scripts
- src
- generated/server/express
- routes
- routes/express
- integration-tests/typescript-express
- src/generated
- api.github.com.yaml
- azure-core-data-plane-service.tsp
- azure-resource-manager.tsp
- okta.idp.yaml
- okta.oauth.yaml
- petstore-expanded.yaml
- stripe.yaml
- todo-lists.yaml
- packages
- documentation/src
- app
- getting-started/quick-start
- guides/server-templates/typescript-express
- overview
- about
- roadmap
- reference/cli-options
- lib/playground
- openapi-code-generator
- src
- typescript/server/typescript-express
- typescript-express-runtime
- src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
63 files changed
+301503
-48
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
15 | 23 | | |
16 | 24 | | |
17 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 95 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments