Wasp-lang

W

Wasp-lang

Join the community to ask questions about Wasp-lang and get answers from other members.

Join

Simple Api call to chatgpt

I have completed installing Open SaaS template and I start to play around with it. I found the AI Day Scheduler example quite difficult to me to understand. if it possible . if someone can create an example app that taking input from user ( as form , upload pdf ) and sending to chatgpt api to return the output of chatgpt that will display to user. i want to use the app within Open SaaS template to use " authintication as well I dont want to reinvent the weel

context.user is empty on api endpoint

export const fooBar = (req, res, context) => {
res.set("Access-Control-Allow-Origin", "*"); // Example of modifying headers to override Wasp default CORS middleware.
res.json({ msg: `Hello, ${context.user ? "registered user" : "stranger"}!` });
};
export const fooBar = (req, res, context) => {
res.set("Access-Control-Allow-Origin", "*"); // Example of modifying headers to override Wasp default CORS middleware.
res.json({ msg: `Hello, ${context.user ? "registered user" : "stranger"}!` });
};
...

Payload error

[ Server!] PayloadTooLargeError: request entity too large

Some General Questions

Hello, I have just stumbled upon Wasp recently, i must say it looks awsome and promising. Being an experienced full stack software engineer i have few questions. 1. How easy it is to shift to any newer version of Node.js or any other dependencies involved which creates the biolerplate code? ...

Worth Moving to the Current State of Open SaaS?

My project is nearing its end. I started about mid June. What do authors think? Are the changes going to add significant value / security / ease of use etc.? Effort would be migrating client, actions, main.wasp (already manually migrated to wasp 0.14), schema, package.json etc. basically I'd think it'd be mostly copy and paste. Opinions?

Wasp-lang is the 💣

I don't have any technical questions for the bot or for the team today. It's been a month of learning wasp-lang. My app is functional, deployed to production, and being sent out to some people for testing. I know of no higher compliment to offer. Y'all fawking rock! 😎

Payload too large

I am getting a payload too large error, directing me to this line: const response = await api.post(operationRoute.path, superjsonArgs) How can adjust the max payload size for uploads?...

An argument for 'context' was not provided.

I'm really struggling to understand this context that gets injected into api calls. I think I got all the configs straight (adding the right entities) in my main.wasp file, but I still get the context was not provided error message. How can I track down which part I am missing to make a call to an action get the context inlined?

Simple File Upload

Hey. What would be the simplest way to add a simple file upload? Like profile picture editing I know there's multer, but it doesn't seem like such a straightforward solution compared to the other features of wasp It would be nice if there was something simpler like Adonis' AttachmentLite....

Issue with @default([]) in schema.prisma during migration from Wasp 13 to 14

I am currently migrating our production application from version 13 to 14, following the migration guide. I’ve made all the necessary code changes, but when I ran the final command, wasp db migrate-dev, I encountered the following error: Wasp couldn't parse your schema.prisma file, please check if you have any errors in it. This was a puzzle to me because the same schema used to work when it was part of the main.wasp file. After some debugging, I ran the following prisma command to check if I would encounter the same error:...

Is Railway still recommended? I note the instructions do not track the Railway site

Example: the docs state that we "generate domain" on the Railway site as the first step. Now, when you go to Railway, this is not an option, apparently it is done after the Deploy step? Unknown, hence, checking before spending significant time on it..

Token questions

what are the docs on implementing tokens in opensaas products? how does it work

Docker Permission Denied when running "wasp start db"

Full Error Message: <USER>@DESKTOP-<stuff>:~/Projects/<saas-proj>/app$ wasp start db ✨ Starting a PostgreSQL dev database (based on your Wasp config) ✨ Additional info:...

Auth working on dev, not so on stage

App has been working, logging in/creating users works on dev, moving it to stage & now running into issues. I'm using the SaaS template & its default authentication. Now on both the /login and /signup routes, the action button is giving a 404. That's all coming from the <LoginForm> which is part of wasp. Who is supposed to be handling these /auth/email/signup and /auth/email/login routes? Why do they work on the dev environment, but are not there in prod?...

Moving from dev (local) to staging server, access control issues abound

I am getting numerous errors loading the /signup page of the form: [blocked] The page at https://mydomain.com/signup was not allowed to display insecure content from http://localhost:3001/auth/me Then when I go to sign up, further errors of the form: Not allowed to request resource...

Can't connect to WASP WebSocket's on Intranet

I'm using WASP 0.14.0 on Mac OS 14.6 and am trying to run the WebSocket example: https://wasp-lang.dev/docs/advanced/web-sockets so that its available on my intranet. However, I can only connect to it on the machine itself with localhost (which works ok). I tried a Socket IO example socket.io-chat-platform and was able to get that working on my network so I know it's not a Firewall issue. Also HTTP access to the WASP app on the network works ok. How can I run the WASP app so WebSockets work on the network?...

Deploy Wasp App do Azure

Has anyone ever deployed a Wasp App to Azure and if so is there any guidance on how to do so? Preferably on how to do it via CI (Github Actions).

Error 401 with authentication

Hello, quick question regarding the authentication, i get two warning and auth page looks different in terms of style. I have also open the incident #253. GET /auth/me 304 GET /auth/me 401 ...

CORS on custom API endpoint

This is what I have in api.ts file import { MiddlewareConfigFn } from "wasp/server"; import { FooBar } from "wasp/server/api"; // This type is generated by Wasp based on the api declaration above. export const apiMiddleware: MiddlewareConfigFn = (config) => {...