hometechdad
WWasp-lang
•Created by hometechdad on 5/5/2023 in #🙋questions
How to update favicon?
Current work around is the following:
After doing the web-app build step
npm install && REACT_APP_API_URL=<url_to_wasp_backend> npm run build
I am manually replacing the favicon.ico located in .wasp\build\web-app\build
directory with the one I created. Then doing the deploy to Netlify.12 replies
WWasp-lang
•Created by hometechdad on 5/5/2023 in #🙋questions
Should the STRIPE_KEY in your environment variables be the Secret Key or the Public Key?
I believe I have found the answer. Please correct me if I am wrong, but it appears that it should be the Secret Key.
3 replies
WWasp-lang
•Created by hometechdad on 4/21/2023 in #🙋questions
How do you set the org slug when deploying to Fly.io
Thanks @IamIconLiving 🎄 that fixed the remaining 2 type errors!
19 replies
WWasp-lang
•Created by hometechdad on 4/21/2023 in #🙋questions
How do you set the org slug when deploying to Fly.io
Ahh, ok. I will try to update. Soccer tournaments all weekend, so I will try to report back later tonight.
I had the URL without the "/" when running the
npm install
command.19 replies
WWasp-lang
•Created by hometechdad on 4/21/2023 in #🙋questions
How do you set the org slug when deploying to Fly.io
Ok, super new to TypeScript, so this may be totally wrong. But here is how I solved the issue...
1. Fixed any TypeScript errors in my local src files. Primarily
class=
instead of className=
issues.
2. Updated .wasp\build\web-app\src\auth\forms\Auth.tsx
line 473-476 to the following:
if (!token) {
let tmpErrorMsg = 'The token is missing from the URL. Please check the link you received in your email.' as unknown as ErrorMessage;
setErrorMessage(tmpErrorMsg)
return
}
3. Updated .wasp\build\web-app\src\test\vitest\helpers.tsx
line 13 to the following:
export type { Route } from '../../types'
This resolved all validation errors and allowed my front end to deploy on netlify. I am 🚀 to netlify and able to access my site. Testing functionality now 🙂
Downside is, that I need to update forms\Auth.tsx
and helpers.tsx
after each build. @Vinny (@Wasp) is this something that needs changed in the SaaS template? Or somewhere else? Or am I causing that issue somewhere?19 replies
WWasp-lang
•Created by hometechdad on 4/21/2023 in #🙋questions
How do you set the org slug when deploying to Fly.io
Thanks @shayne ! I started once again, by removing everything and decided to follow the manual deployment guide: https://wasp-lang.dev/docs/deploying
I wanted to learn more about each step of the process. I am going the route of Fly.io for backend and Netlify for front end.
Backend, setup worked great. I am able to see "Hello, world" from my
https://<app-name>.fly.dev
url.
The first netlify command: npm install && REACT_APP_API_URL=<url_to_wasp_backend> npm run build
spit out a bunch of errors like this one.
> node -r dotenv/config ./scripts/validate-env.mjs
? Validating environment variables...
src/auth/forms/Auth.tsx:474:23 - error TS2345: Argument of type 'string' is not assignable to parameter of type 'ErrorMessage'.
474 setErrorMessage('The token is missing from the URL. Please check the link you received in your email.')
These appear to be TypeSciprt errors, but I believe they are in the core wasp code (maybe the SaaS template? maybe this is somehow impacted by code I created??)?
Let me know if I have gone far enough off topic for this question and I can pull this troubleshooting into the development channel?19 replies
WWasp-lang
•Created by hometechdad on 4/21/2023 in #🙋questions
How do you set the org slug when deploying to Fly.io
19 replies
WWasp-lang
•Created by hometechdad on 4/20/2023 in #🙋questions
How do I add additional products?
Yep, I wanted to give them the option of 1 time or subscription.
8 replies
WWasp-lang
•Created by hometechdad on 4/20/2023 in #🙋questions
How do I add additional products?
Yep, referred back to the great wasp documentation (https://wasp-lang.dev/docs/tutorials/todo-app/04-creating-tasks#action). Then duplicated the
export const stripePayment
function, renamed it and updated line_items
to the 2nd product price id env variable as well as mode
to 'payment'. It seems to be working now.8 replies
WWasp-lang
•Created by hometechdad on 4/20/2023 in #🙋questions
How do I add additional products?
Ok, that makes sense. Would there also need to be changes in Server\Actions.ts? It appears that SUBSCRIPTION_PRICE_ID is coded in that file and we would need to send a different product ID. Correct?
8 replies
WWasp-lang
•Created by Cyberdine on 4/20/2023 in #🙋questions
pg-boss failed to start!
I uncommented that section and the app started up fine. I think @Vinny (@Wasp) was correct. When I first tried, I did not have sendgrid setup.
75 replies
WWasp-lang
•Created by hometechdad on 4/20/2023 in #🙋questions
What is the localhost stripe webhook URL?
Yep, that flag is not mentioned on the stripe documentation: https://stripe.com/docs/cli/docker
16 replies
WWasp-lang
•Created by hometechdad on 4/20/2023 in #🙋questions
What is the localhost stripe webhook URL?
It is all working now, thanks!!
16 replies
WWasp-lang
•Created by hometechdad on 4/20/2023 in #🙋questions
What is the localhost stripe webhook URL?
Yep, I found the issue. Because I am using docker for the stripe cli and because I am doing this from localhost, you need to start it with a specific flag.
--network='host'
docker run --network="host" --rm -it stripe/stripe-cli --api-key <STRIPE_KEY> listen --for
ward-to=localhost:3001/stripe-webhook
Found the resolution here: https://github.com/stripe/stripe-cli/issues/42716 replies
WWasp-lang
•Created by hometechdad on 4/20/2023 in #🙋questions
What is the localhost stripe webhook URL?
maybe something with my PC settings... I will dig into that and report back.
16 replies
WWasp-lang
•Created by hometechdad on 4/20/2023 in #🙋questions
What is the localhost stripe webhook URL?
It looks like the CLI is converting localhost to my ip. So, it is actually trying to go to <local_ip>:3001. When I try that in the browser, I get a connection refused error. However, if I go to <local_ip>:3000 the web app comes up just fine.
16 replies
WWasp-lang
•Created by hometechdad on 4/20/2023 in #🙋questions
What is the localhost stripe webhook URL?
Yep, I see 'hello world'
16 replies
WWasp-lang
•Created by hometechdad on 4/20/2023 in #🙋questions
What is the localhost stripe webhook URL?
16 replies
WWasp-lang
•Created by Cyberdine on 4/20/2023 in #🙋questions
pg-boss failed to start!
I had a similar issue. I may be wrong, but I believe pg-boss is used for jobs (like cron jobs sending emails). This may not be the best solution, but for me, I did not need this functionality. So, I commented out the
job emailChecker
code at the bottom of the main.wasp file. It resolved that error for me (for now)...75 replies