wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
13.63k stars 1.18k forks source link

Allow users to store private non-source files #2175

Open sodic opened 3 months ago

sodic commented 3 months ago

We should give users a way to store private non-source files that the app uses (like the public dir, only private).

Motivation

From the message: https://discord.com/channels/686873244791210014/1260392522761371659/1260392522761371659

Is there a way to reference a google cloud key.json file after compiling? I currently have it placed in the /app directory and storing that path to the key as an .env var. Is there a way to make sure that file is also moved into the compiled project after running wasp start? Thanks for your help!

Thanks for the feedback, Connor!

infomiho commented 3 months ago

Related to https://github.com/wasp-lang/wasp/issues/1564

Martinsos commented 3 months ago

SO not Wasp app users but Wasp framework users! Maybe we should say Wasp devs, not sure.

This is interesting use case. I think it falls under secret management. We have plans to make it easier to do this for .env files. But it could be used for other files also. I wonder what is the best practice though. They key.json -> I imagine it might be better to take its contents/value and just put it directly into .env.server, why woudln't that be the solution? Soudns a bit unusual to keep that file around. Is there a standardized way of dealing with that key.json file? What does Google Cloud recommend?

sodic commented 3 months ago

SO not Wasp app users but Wasp framework users!

Yes, this trips me up all the time. When I say users, I usually mean Wasp framework users, and for Wasp app users I say "Wasp app users."

When I hear "Wasp devs", I think about the three of us :smile:

I don't know what to do, but we can agree on something and make it consistent.

sodic commented 3 months ago

As for the keys.json specifically - I have no idea what the best practice is (maybe it's indeed better to just use an env variable). That's what I told Connor to do in Discord.