Skip to content
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

Support ExpressOptions.expressInstance in createApp #547

Merged
merged 1 commit into from
Sep 18, 2019

Conversation

LoicPoullain
Copy link
Member

Issue

In some situations, we may need to specify both an expressInstance and postMiddlewares to createApp (for example if we're migrating an application from Express to Foal). This is currently not possible to do it properly.

Solution and steps

  • Support ExpressOptions.expressInstance in createApp.

Checklist

  • Add/update/check docs (code comments and docs/ folder).
  • Add/update/check tests.
  • Update/check the cli generators.

Related issue

See this discussion: #370

@LoicPoullain LoicPoullain mentioned this pull request Sep 18, 2019
5 tasks
@codecov
Copy link

codecov bot commented Sep 18, 2019

Codecov Report

Merging #547 into v1-2-0 will increase coverage by 0.07%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           v1-2-0     #547      +/-   ##
==========================================
+ Coverage   99.49%   99.57%   +0.07%     
==========================================
  Files          88       88              
  Lines        1586     1636      +50     
  Branches      340      371      +31     
==========================================
+ Hits         1578     1629      +51     
+ Misses          8        7       -1
Impacted Files Coverage Δ
packages/core/src/express/create-app.ts 98.85% <100%> (+1.41%) ⬆️
packages/core/src/common/utils/controller.util.ts 100% <0%> (ø) ⬆️
...ages/core/src/common/utils/verify-password.util.ts 100% <0%> (ø) ⬆️
packages/core/src/sessions/token-optional.hook.ts 100% <0%> (ø) ⬆️
packages/core/src/sessions/token-required.hook.ts 100% <0%> (ø) ⬆️
packages/core/src/sessions/set-session-cookie.ts 100% <0%> (ø) ⬆️
...api/metadata-getters/get-api-complete-operation.ts 100% <0%> (ø) ⬆️
packages/core/src/express/create-middleware.ts 100% <0%> (ø) ⬆️
packages/core/src/express/handle-errors.ts 100% <0%> (ø) ⬆️
...ackages/core/src/sessions/remove-session-cookie.ts 100% <0%> (ø) ⬆️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8af5d20...7fb048b. Read the comment docs.

@LoicPoullain LoicPoullain merged commit 9c539d1 into v1-2-0 Sep 18, 2019
@LoicPoullain LoicPoullain deleted the create-app-express-instance branch September 18, 2019 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant