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

Set up http server for blobs and icons in MapeoManager #329

Closed
4 tasks done
achou11 opened this issue Oct 5, 2023 · 1 comment · Fixed by #365 or #369
Closed
4 tasks done

Set up http server for blobs and icons in MapeoManager #329

achou11 opened this issue Oct 5, 2023 · 1 comment · Fixed by #365 or #369
Assignees

Comments

@achou11
Copy link
Member

achou11 commented Oct 5, 2023

Description

The plan is to set up a single server to handle http requests for both blobs (e.g. media) and icons (part of project configs).

The implementation will roughly look similar to this:

this.#fastifyServer = new Fastify({...})

// Register the blob routes
this.#fastifyServer.register(BlobServerPlugin, {
  prefix: '/blob/',
  // whatever other opts...
)

// Register the icon routes
this.#fastifyServer.register(IconServerPlugin, {
  prefix: '/icon/',
  // whatever other opts...
)

Tasks

  • Create fastify server in MapeoManager and register the blob and icon plugins
  • Remove blob server creation in MapeoProject
  • Move blobServer to MapeoManager as a Plugin
  • Move iconServer to MapeoManager as a Plugin (Feat: Icon HTTP Server #315 )
@tomasciccola tomasciccola self-assigned this Oct 5, 2023
@achou11
Copy link
Member Author

achou11 commented Oct 5, 2023

For that first task, wondering if there are any thoughts on making the server instance a contructor option for the MapeoManager?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants