Skip to content

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 16 commits into from
May 5, 2025
Merged

Conversation

mnahkies
Copy link
Owner

@mnahkies mnahkies commented May 4, 2025

introduces a second server template, typescript-express

Tasks

  • Template
  • Runtime
  • Integration tests
  • Existing E2E tests
  • Additional E2E tests
  • Documentation
  • 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.

Copy link

@github-advanced-security github-advanced-security bot left a 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 mnahkies force-pushed the mn/feat/typescript-express branch from c1c21d9 to c436d7b Compare May 5, 2025 12:36
@mnahkies mnahkies force-pushed the mn/feat/typescript-express branch from c436d7b to 2e993a4 Compare May 5, 2025 13:14
@mnahkies mnahkies marked this pull request as ready for review May 5, 2025 13:27
@mnahkies mnahkies enabled auto-merge (squash) May 5, 2025 13:31
@mnahkies mnahkies merged commit af9a1e7 into main May 5, 2025
5 checks passed
@mnahkies mnahkies deleted the mn/feat/typescript-express branch May 5, 2025 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant