W
Wasp-lang•3mo ago
Juan

wasp start

Can the 'wasp start' take arguments so I can specify a development version of the env.server file which includes Dummy email provider. This is more for convenience.
6 Replies
kapa.ai
kapa.ai•3mo ago
Hi @Juan. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Currently, Wasp does not support passing arguments to the wasp start command to specify a different environment file. The wasp start command is used to launch the Wasp app in development mode and it does not take any arguments [^1^]. However, you can manage different environment setups using .env files. For development, you can use the .env.server file to set up environment variables, including setting the email provider to Dummy[^2^]. Here is how you can do it:
app Example {
...
emailSender: {
provider: Dummy,
}
}
app Example {
...
emailSender: {
provider: Dummy,
}
}
Remember, the Dummy provider is only meant for development and not for production[^3^]. For production, you can use providers like SMTP, Mailgun, or SendGrid[^4^]. If you want to switch between different setups, you might need to manually change the provider in the .env.server file or maintain different versions of the file and rename them as needed. [^1^]: (https://wasp-lang.dev/docs/general/cli#project-commands) [^2^]: (https://wasp-lang.dev/docs/project/env-vars#defining-env-vars-in-development) [^3^]: (https://wasp-lang.dev/docs/advanced/email#providers) [^4^]: (https://wasp-lang.dev/docs/advanced/email) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @Juan, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Juan
JuanOP•3mo ago
Thanks Kapa. That's all I needed.
miho
miho•3mo ago
Thank you for the great idea đź‘Ť Allow Wasp start to accept params like which env file to use is a great idea! @martinsos what do you think?
MEE6
MEE6•3mo ago
Wohooo @miho, you just became a Waspeteer level 36!
martinsos
martinsos•3mo ago
Maybe @miho ! I think we have to yet figure out the best workflow with .env files. I think specifying it via CLI might make sense, but am not 100% sure yet. We should keep it in mind as an idea though! We have a couple of issues on Github that are addressing improving env vars support, including having more .env files with better names, this is probably most related to that @Juan did this help you out at the end? I didn't quite get what the bot was aiming for
Juan
JuanOP•3mo ago
Not really. The bot just confirmed what I suspected. It's not bad managing a development .env file and renaming it properly when needed. Just wanted to see if there was a built in way already.
Want results from more Discord servers?
Add your server