mgp25
WWasp
•Created by mgp25 on 11/28/2024 in #đŸ™‹questions
CORS Issue
Actually, it was a fault on my end, with NGINX config.
Revealed a misconfiguration caused by certbot applying certain configs on its own.
I apologise for this but hopefully this helps out for other users facing similar issues.
Thank you!
12 replies
WWasp
•Created by mgp25 on 11/28/2024 in #đŸ™‹questions
CORS Issue
Hey @Filip ! Yes, I have deployed it on a VPS under a domain, I dont mind sharing the access via DM
XMLHttpRequest is shown in the web console (browser). So frontend not able to communicate to backend because of cors.
As per the headers returns when a curl is made to the backend:
12 replies
WWasp
•Created by mgp25 on 11/21/2024 in #đŸ™‹questions
Question about shared constants
I am using wasp 0.13.0 but maybe I missed that step. Once I have everything working on my end will be migrating to the most recent wasp release.
I have develop some software in the past and sometimes backward breaks are inevitable in order to make the code better/more efficient. Keep up the good work! đŸ™‚
21 replies
WWasp
•Created by mgp25 on 11/21/2024 in #đŸ™‹questions
Question about shared constants
I thought about 1. as well, but I wasnt sure which would be the best to have things organised. As per 2. I was about to ask how to do it, but just saw your edit, and making a query is also a suitable option. Will think about these
Thank you for your response!
21 replies
WWasp
•Created by mgp25 on 11/21/2024 in #đŸ™‹questions
Question about shared constants
I did! I had to do some tweaking and also realised one thing along the way.
1. I had to create
vite-env.d.ts
which should has this inside:
2. /shared/constants.ts
is a file that is run both in Client and server side, which means import.meta.env.
wont work in server side, causing it to crash.
So you end having two possible alternatives, either using a specific client side constants file, or just edit the shared constants to make sure is not run in server:
21 replies
WWasp
•Created by mgp25 on 11/21/2024 in #đŸ™‹questions
Question about shared constants
I am doing @kapa.ai :
But is getting
TS2339: Property env does not exist on type ImportMeta
I have tried other solutions based on vite-env.d.ts
but causes :
because of vite misconfig probably.
Any recommendation for this?21 replies
WWasp
•Created by mgp25 on 11/21/2024 in #đŸ™‹questions
Question about shared constants
Hello @Vinny (@Wasp) . Havent tried yet, but seems to be a good approach. We are on 0.13.0 we would need to check if there are backward breaks but we will look into it
thank you!
21 replies