-
Notifications
You must be signed in to change notification settings - Fork 2
feat: typescript-express server template #324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
mnahkies
commented
May 4, 2025
...code-generator/src/typescript/server/typescript-express/typescript-express-router-builder.ts
Show resolved
Hide resolved
c1c21d9
to
c436d7b
Compare
# Conflicts: # packages/openapi-code-generator/src/typescript/server/server-operation-builder.ts
# Conflicts: # packages/typescript-koa-runtime/src/server.ts
c436d7b
to
2e993a4
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
introduces a second server template,
typescript-express
Tasks
Why Express
express
is one of the most popular server frameworks for NodeJS, getting approximately 10x as many weekly downloads askoa
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:
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.