Wasp-lang

W

Wasp-lang

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

Join

Return static files from the server

Is there a possibility to return files from the server app using res.sendFile()? If so, how would you include the assets folder in the output directory and reference it from the code? The functionality i want to achieve is to return an image based on some db calculated data. Its a small set of images, so a whole external image storage seems like overkill as its supposed to be around 6 images....

Calling the backend from a different domain

Im using a domain example.com for the client and myserver.railway.app for the backend. However, im getting a CORS error on this setup, Is there a way around it? Access to XMLHttpRequest at 'myserver.railwayapp.com/operations/tasks' from origin 'example.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource....

How can I seed my production?

I cant seem to seed my production on deploy

Wildcard routes for 404/not found redirects?

I don't see a way to make this possible at the moment.

Responsive

Thanks for the great framework! Are the webapps by default responsive (mobile)?

Custom domain with Fly.io not working?

Currently trying to set up a custom domain with Fly.io. I can see the certs being created and the site is reachable, but every time I go to the log in page I am met with the attached error. Where could I configure this CORS header in wasp?
No description

Help with Fly.io Deploy?

Tried doing the intro ToDo tutorial and was met with some weird errors upon deploying to fly.io. Looks like the system isn't starting at all for some reason. Attached are the logs from the fly client machine. Weirdly the DB server seems to be working fine.

Q&A with Embeddings & GPT

Hello! I'm looking to integrate a piece of code into my SaaS kit app. This is the page in cause that I want to integrate into Wasp: https://github.com/tsensei/QueryGPT/blob/main/completion.js...
No description

File-Upload using a custom API

I am trying to setup a file upload using the custom apis. First i setup the fileupload-express middleware like this: ``` import fileUpload from 'express-fileupload' import { ServerSetupFn } from '@wasp/types'...

Shame, OpenBSD is not supported

vm# curl -sSL https://get.wasp-lang.dev/installer.sh | sh Sorry, this installer does not support your operating system: OpenBSD. Possible to add OpenBSD support? I use last release 7.3, node is v18.15.0...
No description

Typescript required?

Using Wasp, can we use only javascript? Or it is necessary to know TypeScript?

Running "wasp deploy" returns odd error

```bash $ ~/workspace/wasp/apple wasp-cli new banana :bee: --- Creating your project from the basic template... --------------------------- ...

"wasp compile" is not documented or I'm missing something?

Hi, I was messing on Wasp CLI internals earlier, and I found there is a command called compile https://github.com/wasp-lang/wasp/blob/53ee9297f9c781bd82453d5364c64272d1f33911/waspc/cli/exe/Main.hs#L46 but I don't see it being documented on cli --help page nor here https://wasp-lang.dev/docs/cli#. Is it the same as wasp start minus the running web server part?

Noob Question: How would one add a proper dropdown to the NavBar?

Hello and sorry for this very basic question: I've tried implementing what was on headlessui's Dropdown page (https://headlessui.com/react/menu) but I didn't manage to get it working properly (functions ok but styling is way way off and worse on mobile). I've reverted the code in hopes I'll find some more references before trying again. Is there any snippet of code for an example dropdown that retains the same style as the other buttons? Just 2 example buttons under a menu. (I'm mostly talking about SaaS template). Thank you!...

Error: secretOrPrivateKey must have a value

Hi, locally registration is working for me, but when deployed to railway I'm getting error 500 on sign up. Looks like some env variable is missing or wasp reads it wrongly
No description

accessing env on client

I've put const variable to shared folder to read env. When importing it from @wasp/shared on server side it works fine but with client I'm getting
ReferenceError: process is not defined
ReferenceError: process is not defined
in browser. So, how to read env on client?

[SOLVED] Websocket implementation

Hey ! Has anyone tried implementing websockets ?

[SOLVED] Error when trying to use dbSeeding.

Hi. I am trying to used dbSeeding, but have some error. This does not depends on body of my seeding function.
No description

How to update favicon?

I found https://github.com/wasp-lang/wasp/discussions/934 on this topic. However, I am missing something. I have the following in my app.head section: `head: [ "<meta property='og:type' content='website' />", "<meta property='og:image' content='src/client/static/image.png' />",...

Should the STRIPE_KEY in your environment variables be the Secret Key or the Public Key?

Should the STRIPE_KEY in your environment variables be the Secret Key or the Public Key?