-
-
Notifications
You must be signed in to change notification settings - Fork 130
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: private dir #514
feat: private dir #514
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
@dai-shi no problem to implement this for aws lambda but :
|
This feature is about "filesystem access" and not meant for a cloud deployment without filesystem. For cloud services without filesystem, we need bundling as you suggest, and I think it's already possible as of now, optionally using such plugins. |
have a look at unstorage - with this abstraction you can cover all your use cases, get a consistent api. There is already a huge list of plugins. If you miss something I can provide the code for the missing e.g. filesystem adapter as I have done for AWS S3 and dynamodb. |
I mean, we don't prevent using such libraries. My understanding is it's already supported. Let me know if it doesn't work. |
I only want to help and not to extend this discussion, but you mention somewhere you would like to follow web standards. I know unstorage is a product of the unjs universe where h3 is a similar product as Hono chooses for this project. There is no problem to implement this for AWS Lambda as it uses Node. But AWS Lambda Edge is similar to Cloudflare and some other Serverless provider only a browser runtime without any support for |
Yeah, that's correct. So, this seems kind of exceptional.
Oh, I see. Yeah, if it's possible in an easy way, let's do that.
I think it's the same situation with Vercel and Netlify. Vercel serverless functions can be Node based, but Vercel edge functions are not. Netlify functions are Node based, but Netlify edge functions are not. So, if we use AWS Lambda, not AWSLambda Edge, which is Node based, we can support
So, it was our miscommunication and does "we follow web standard, but also support Nodejs if users want, as long as it doesn't break web standard usage" sound okay? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moving forward for now.
? './README.md' | ||
: '../../README.md'; | ||
const file = readFileSync(fileName, 'utf8'); | ||
const file = readFileSync('./private/README.md', 'utf8'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't know if ./private/...
path in the code is confusing or not.
If it's not quite acceptable by users, let's consider removing the capability.
}): Plugin { | ||
let privatePath: string; | ||
return { | ||
name: 'rsc-env-plugin', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, found a typo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe an alternative approach is to provide |
Yes, this is an option but I would remove this feature - people who need a private read and writable data store, can implement it by them self and know the limits of their deployment environments. Nearly all cloud provide suggest to use a block storage (e.g. s3) or a shared KV store (Cloudflare, Deno deploy, ..) for this use case. |
That's one option.
Or, does it work with
Do you mean to manually copy files? That's exactly the feature this PR is trying to automate. |
Ok - the use case is a blog with a folder of markdown files which are not static rendered. To be clear - the current release of WAKU with #535 is a minimal documentation on how to deploy to AWS Lambda with an example |
Thanks for the clarification. We create waku/packages/waku/src/lib/builder/output-netlify.ts Lines 38 to 48 in ff20bfe
|
The problem with AWS is, that there are 3 official ways (AWS CLI, SAM, CDK) to deploy to the infrastructure and a whole bunch of other options (e.g. Serverless Framework, SST, Pulumi, Terraform,...). Currently the builder for AWS creates an output which can be consumed by all of them. To support them is too much work and the user needs to adapt the config files to their environment on AWS and to the other infrastructure they want to create (e.g. DNS records, databases,...). This will only allow us to create a config once and does not allow any changes later. I hope you agree, that the current documentation is a good start to get a project up and running including support for the private dir. |
Can we pick one that best matches to Waku?
Let me check the PR again, but in general, I just count on you, based on our conversation so far. |
People which look for a simple deployment platform will choose Vercel or netlify - this is their market position against AWS and Azur. The main reason I support this project is, that I am looking for a valid react rsc framework which supports AWS Lambda directly. Running NextJS in the AWS environment is not supported by Vercel and the existing external solutions break with small and big releases. |
"./private" for files that can only be read on the server.