Wasp-lang

W

Wasp-lang

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

Join

hot swapping auth

Background: I've got a wasp app running username and password -NOTE: the app has actions and queries that refer to the username (provideUserId) in order to display it in the ui Wasp version: 0.14.0 Platform: MacOS Sonoma 14.1.1 ...
No description

[RESOLVED] http://localhost:3000/ is just blank page? Everything on installed seemed fine?

I installed and followed the openSaaS installation guide carefully, I'm on an M2 Mac, when I run "wasp start" in my app directory, it just navigates me to a blank page. I think I did everything right? The example blog seems to be working.. Any help much appreciated lol.
No description

User dropdown and Auth not visible/working upon deployment

Hello, So i have deployed my app using fly.io and neither the user menu dropdown nor authentication is working as it should, i have experienced the same issue when not connectected to the internet but i did not imagine i would come across it in production does anyone know how to fix this?...

Update Wasp AI to use latest GPT model

I would like to ge use the WASP AI feature however it is very expensive as it is still using the gpt-4-0613 model. Would it be possible to update this to use gpt-4o which is a lot cheaper?

Render for deployment a good choice?

I am looking to build a web app and trying to decide which provider to deploy on. I like Render very much from a dev experience perspective. I notice it is not on the list of supported providers for Wasp. Is it going to be a blocker? Or is there a standardised deployment method regardless of provider?

Best Way of Migrating DB on deployed project?

When I'm running locally and my schema changes, I just run wasp db migrate-dev - what's the best approach for this when I have a production environment deployed?

Scaling

If i wanted to scale the backend server or put it behind a load balancer, how should i go ahead about doing it?

Did I accidentally delete a folder/files? 'wasp/client/router' & 'wasp/client/auth'

Extreme newbie, I may be way off base but I feel like I am missing two files.
No description

How to get custom import aliases

how can i implement custom import aliases in wasp? for example shadcn ui library

How to create and use a custom template?

How do I create a template and how do I use it once it is created?

wasp start

Can the 'wasp start' take arguments so I can specify a development version of the env.server file which includes Dummy email provider. This is more for convenience.

Can you eject?

In the off chance that i wanted to eject from wasp and continue standalone development would taking the code out of .wasp be viable ?

How to Automatically Create Default Values in a Related Table on User Signup?

Version: 0.13.2 I'm building a project using Wasp-lang where I need to automatically create default entries in a Priority table whenever a user signs up via Google Auth (no custom fields). Specifically, when a new user is registered, I want to insert predefined rows in the Priority table linked to that user. What is the recommended approach for implementing this logic in Wasp-lang following best practices? Should I use a signup hook, or is there another method I should consider?...

What causes this rollup error?

What causes this rollup error when running wasp start? ``` [!] 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)...

Can't set client environment when deploying to Fly.io

I've followed the docs https://wasp-lang.dev/docs/advanced/deployment/cli#client to set the client environment variable when deploying to fly.io I run REACT_APP_API_URL=https://api.myapp.com wasp deploy fly deploy But when it finished deploying to server and starts to deploy to client, it still execute below command...

Why doesn't console.log output anything to terminal?

I am trying to debug cors middleware setup. In main.wasp I have: ``` server: { setupFn: import setup from "@src/ServerSetup", middlewareConfigFn: import { serverMiddlewareFn } from "@src/ServerSetup"...

Getting the user in the rootcomponent

I specified the rootComponent for my client: ``` client: { rootComponent: import Root from "@src/client/Root", }...

Accessing/changing another entity when performing a db action

I'm new to NodeJS, prisma and the likes and am having some trouble implementing an action. When I create a Student, they need to get a number assigned to them. If there are already 10 students in the class, the next created student should get number 11. I'm not sure how to best do this. ...

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"}!` });
};
...