mm
mm
WWasp
Created by RichardHpa on 3/10/2024 in #đŸ™‹questions
Can I split up the main.wasp file into seperate files
I started with making it work first using the main.wasp.ts. before I started splitting the code but up to you. you should start with the link @miho sent
28 replies
WWasp
Created by RichardHpa on 3/10/2024 in #đŸ™‹questions
Can I split up the main.wasp file into seperate files
No description
28 replies
WWasp
Created by RichardHpa on 3/10/2024 in #đŸ™‹questions
Can I split up the main.wasp file into seperate files
Hi about what I said about exposing the App type, it's just in wasp-config lol my bad `import { App } from "wasp-config" I will update the article. We can properly split the config in this case
28 replies
WWasp
Created by RichardHpa on 3/10/2024 in #đŸ™‹questions
Can I split up the main.wasp file into seperate files
interesting. can you also send me the medium article? thanks!
28 replies
WWasp
Created by RichardHpa on 3/10/2024 in #đŸ™‹questions
Can I split up the main.wasp file into seperate files
@RichardHpa @martinsos I recently decided to switch to the .ts version. and also searched for a solution. Then I came up with this: https://dev.to/medardm/splitting-wasp-ts-config-2iei Please let me know if it's not going to affect anything. Would be great also if you can expose a type for the App instance
28 replies
WWasp
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
Payload too large
the problem was I added setupFn: import {serverMiddlewareFn} from "@src/serverSetup", while importing the same function as the middlewareConfigFn that's why middlewareConfigFn was not detected. it's being executed from setupFn I guess
37 replies
WWasp
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
Payload too large
Hi @miho @martinsos found the problem. I just removed the setupFn since I'm not using it. What customizations can I do with setupFn btw.
server: {
// setupFn: import {serverMiddlewareFn} from "@src/serverSetup",
middlewareConfigFn: import { serverMiddlewareFn } from "@src/serverSetup"
},
server: {
// setupFn: import {serverMiddlewareFn} from "@src/serverSetup",
middlewareConfigFn: import { serverMiddlewareFn } from "@src/serverSetup"
},
37 replies
WWasp
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
Payload too large
Hi @miho not yet. haven't tried the bare-bones yet. busy with something else. will update you guys once I tried that one
37 replies
WWasp
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
Payload too large
No description
37 replies
WWasp
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
Payload too large
did you not get a console error? saying middleware config set not a
37 replies
WWasp
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
Payload too large
does the node version matter? I'm using v20
37 replies
WWasp
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
Payload too large
it really says middlewareconfig.set is not a function
37 replies
WWasp
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
Payload too large
Hi @miho it is located in app/src and yes named exactly like that
37 replies
WWasp
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
Payload too large
Hi @martinsos @miho do I need to provide the whole wasp file? Here are the code snippets wasp file
app OpenSaaS {
wasp: {
version: "^0.14.0"
},

title: "IntelTools",

.......

server: {
setupFn: import {serverMiddlewareFn} from "@src/serverSetup",
middlewareConfigFn: import { serverMiddlewareFn } from "@src/serverSetup"
},
app OpenSaaS {
wasp: {
version: "^0.14.0"
},

title: "IntelTools",

.......

server: {
setupFn: import {serverMiddlewareFn} from "@src/serverSetup",
middlewareConfigFn: import { serverMiddlewareFn } from "@src/serverSetup"
},
server setup
import express from 'express';
import { config, type MiddlewareConfigFn } from 'wasp/server';

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

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

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

return middlewareConfig;
};
Error
[ Server ] pg-boss started!
[ Server!] TypeError: middlewareConfig.set is not a function
[ Server!] at serverMiddlewareFn (/Users/mm/code/intelhouse/inteltools/app/src/serverSetup.ts:6:20)
[ Server!] at startServer (/Users/mm/code/intelhouse/inteltools/app/.wasp/out/server/src/server.ts:25:10)
[ Server!] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[ Server ] pg-boss started!
[ Server!] TypeError: middlewareConfig.set is not a function
[ Server!] at serverMiddlewareFn (/Users/mm/code/intelhouse/inteltools/app/src/serverSetup.ts:6:20)
[ Server!] at startServer (/Users/mm/code/intelhouse/inteltools/app/.wasp/out/server/src/server.ts:25:10)
[ Server!] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
37 replies
WWasp
Created by prof_mark on 8/23/2024 in #đŸ™‹questions
Payload too large
No description
37 replies
WWasp
Created by mm on 8/8/2024 in #đŸ™‹questions
Uncaught Error when using prisma inside `app/src/server/utils.ts`
No description
27 replies
WWasp
Created by mm on 8/8/2024 in #đŸ™‹questions
Uncaught Error when using prisma inside `app/src/server/utils.ts`
When I have the time I will try this out in a fresh opensaas setup. I kinda re-organized the directories for this project maybe that's causing this? though I'm not sure if it's supposed to be an issue.
27 replies
WWasp
Created by mm on 8/8/2024 in #đŸ™‹questions
Uncaught Error when using prisma inside `app/src/server/utils.ts`
No description
27 replies
WWasp
Created by mm on 8/8/2024 in #đŸ™‹questions
Uncaught Error when using prisma inside `app/src/server/utils.ts`
I'll check later after deployment. or can I run wasp start while deploying??
27 replies
WWasp
Created by mm on 8/8/2024 in #đŸ™‹questions
Uncaught Error when using prisma inside `app/src/server/utils.ts`
these are the files that make uses the utils
27 replies