prof_mark
prof_mark
WWasp-lang
Created by devrim on 8/21/2024 in #đŸ™‹questions
Tutorial API implementation doesn't work for me.
Lol that works too haha
30 replies
WWasp-lang
Created by devrim on 8/21/2024 in #đŸ™‹questions
Tutorial API implementation doesn't work for me.
Ah I see, that makes sense, thank you! I wonder if it might make sense to had a flag in fly deploy for beginners like me who are using opensaas - the flag could just tell the deployment script to grab all my env values and run the
fly set
fly set
command with these values for me.
30 replies
WWasp-lang
Created by devrim on 8/21/2024 in #đŸ™‹questions
Tutorial API implementation doesn't work for me.
ofc these should not be checked in to version control, but shouldnt it be fine to send the .env files (or at least the values from there) to the fly deployment automatically (when using the
wasp deploy fly
wasp deploy fly
command)? I dont think there is a need to set these manually rather than pulling them from the .env file and setting them automatically
30 replies
WWasp-lang
Created by devrim on 8/21/2024 in #đŸ™‹questions
Tutorial API implementation doesn't work for me.
ok it turns out my issue was fixed by setting the env vars on fly manually as described here: https://wasp-lang.dev/docs/advanced/deployment/cli#environment-variables-1 my question is then why I am also setting them in .env.server and/or why these are not pull from the .env.server file and set for my automatically as part of deployment. I think this is also related to the issue here: https://github.com/wasp-lang/wasp/issues/2053
30 replies
WWasp-lang
Created by devrim on 8/21/2024 in #đŸ™‹questions
Tutorial API implementation doesn't work for me.
im getting this error and cannot figure out what is going on. i have the GOOGLE_CLIENT_ID in my .env.server file, but somehow I guess fly is not picking it up on my redeploys
30 replies
WWasp-lang
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
An argument for 'context' was not provided.
i cant remember the context not avaible bit, but the key thing i was not understanding is that
wasp/server/operations
wasp/server/operations
is a special place where all the actions and queries you define are collected. one can make new actions and queries in whatever files, bu then you import them from this special
wasp/server/operations
wasp/server/operations
place.
8 replies
WWasp-lang
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
Payload too large
Was trying to send a 512x512 base 64 encoded image to open AI for their vision model. So really just needed to pass through. Ended up switching to sending the URL since I'm uploading the images to s3 anyway
16 replies
WWasp-lang
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
Payload too large
Awesome thank you!
16 replies
WWasp-lang
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
Payload too large
this didnt work. i am giving up for now and hopefully someonw has an idea
16 replies
WWasp-lang
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
Payload too large
I've tried following the directions here: https://wasp-lang.dev/docs/advanced/middleware-config#default-middleware-definitions I now have in my serverSetup.ts file:
import express from 'express';
import { type MiddlewareConfigFn } from 'wasp/server';

export const serverMiddlewareFn: MiddlewareConfigFn = (middlewareConfig) => {
// Increase payload size limit
middlewareConfig.set('express.json', express.json({ limit: '50mb' }));
middlewareConfig.set('express.urlencoded', express.urlencoded({ limit: '50mb', extended: true }));

return middlewareConfig;
};
import express from 'express';
import { type MiddlewareConfigFn } from 'wasp/server';

export const serverMiddlewareFn: MiddlewareConfigFn = (middlewareConfig) => {
// Increase payload size limit
middlewareConfig.set('express.json', express.json({ limit: '50mb' }));
middlewareConfig.set('express.urlencoded', express.urlencoded({ limit: '50mb', extended: true }));

return middlewareConfig;
};
but I now get an error:
[ Server!] [!] RollupError: src/server.ts (6:7): "default" is not exported by "../../../src/serverSetup.ts", imported by "src/server.ts".
[ Server!] https://rollupjs.org/troubleshooting/#error-name-is-not-exported-by-module
[ Server!] src/server.ts (6:7)
[ Server!] 4: import { config } from 'wasp/server'
[ Server!] 5:
[ Server!] 6: import setup from '../../../../src/serverSetup'
[ Server!] ^
[ Server!] [!] RollupError: src/server.ts (6:7): "default" is not exported by "../../../src/serverSetup.ts", imported by "src/server.ts".
[ Server!] https://rollupjs.org/troubleshooting/#error-name-is-not-exported-by-module
[ Server!] src/server.ts (6:7)
[ Server!] 4: import { config } from 'wasp/server'
[ Server!] 5:
[ Server!] 6: import setup from '../../../../src/serverSetup'
[ Server!] ^
Any ideas @kapa.ai
16 replies
WWasp-lang
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
An argument for 'context' was not provided.
ok, I seem to have fixed this by moving my new action into the existing operations.ts file - I wanted to separate this action into a new file. is operations.ts a reserved file name? Also, does anyone think it would be worth to add "//autogenerated" to the top of all autogenerated files? This way I don't need to guess at what I can be editing and what is autogenerated?
8 replies