frontity icon indicating copy to clipboard operation
frontity copied to clipboard

Add `server` middlewares defined in packages to the Koa app

Open DAreRodz opened this issue 4 years ago • 4 comments

What:

Get middlewares exposed by Frontity packages in the server property and register them into the Koa server.

Co-authored-by: @cristianbote

Why:

To close #696

Tasks:

  • [ ] Code
  • [ ] TSDocs
  • [ ] TypeScript
  • [ ] Unit tests
  • [ ] End to end tests
  • [ ] TypeScript tests
  • [ ] Update community discussions
  • [ ] Add a changeset (with link to its Feature Discussion if it exists)

Unrelated Tasks

  • [ ] Update starter themes
  • [ ] Update other packages

DAreRodz avatar Jun 18 '21 12:06 DAreRodz

⚠️ No Changeset found

Latest commit: 409fe416730c834b60293c40bbc86fc718558734

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Jun 18 '21 12:06 changeset-bot[bot]

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: :white_check_mark: success
  • Annotations: 0 total

Report generated by eslint-plus-action

github-actions[bot] avatar Jun 18 '21 12:06 github-actions[bot]

After doing some minimal testing, I've noticed that middlewares are registered for each request, again and again. That would be fixed though once we implement https://github.com/frontity/frontity/issues/695.

@SantosGuillamot should I mark the issue as blocked?

DAreRodz avatar Jun 18 '21 14:06 DAreRodz

Sure, I have just done it :slightly_smiling_face:

SantosGuillamot avatar Jun 21 '21 12:06 SantosGuillamot