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

feat: allow mounting folders in workers #112

Merged
merged 1 commit into from
Mar 16, 2023

Conversation

Angelmmiguel
Copy link
Contributor

@Angelmmiguel Angelmmiguel commented Mar 15, 2023

Introduce a new feature to mount arbitrary folders in a specific workers. It allows developers to provide assets and libraries to the workers as they need. To mount a folder, you only need to add a new configuration parameter in the worker config:

version = "1"

[[folders]]
from = "./_assets"
to = "/src/assets"

Note this configuration is defined at worker level. Every worker can define their own sets of required folders.

Other changes

  • Move the worker configuration from the Route struct to the Worker
  • Remove the name config property from the CLI output. It's not providing any meaningful information
  • Provide always a default configuration to avoid dealing with Option
  • Add a new python-mount example
  • Ignore files and folders that starts with _. Those will be the folders that will be mounted later on

It closes #53

@Angelmmiguel Angelmmiguel added the 🚀 enhancement New feature or request label Mar 15, 2023
@Angelmmiguel Angelmmiguel added this to the v1.1.0 milestone Mar 15, 2023
@Angelmmiguel Angelmmiguel requested a review from a team March 15, 2023 13:10
@Angelmmiguel Angelmmiguel self-assigned this Mar 15, 2023
@Angelmmiguel Angelmmiguel merged commit b91a3df into main Mar 16, 2023
@Angelmmiguel Angelmmiguel deleted the 53-mount-folders-in-workers branch May 8, 2023 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for mounting folders in Wasm modules
3 participants