wasp/examples/websockets-realtime-voting
2024-02-09 13:10:37 +01:00
..
migrations Injected auth models (#1583) 2024-01-03 14:40:08 +01:00
src Injected auth models (#1583) 2024-01-03 14:40:08 +01:00
.gitignore Add websockets example app (#1510) 2023-10-16 16:14:57 +02:00
.wasproot Add websockets example app (#1510) 2023-10-16 16:14:57 +02:00
image.png Add websockets example app (#1510) 2023-10-16 16:14:57 +02:00
main.wasp Injected auth models (#1583) 2024-01-03 14:40:08 +01:00
postcss.config.cjs Add websockets example app (#1510) 2023-10-16 16:14:57 +02:00
README.md Updates docs and websockets README (#1511) 2023-10-16 16:21:38 +02:00
tailwind.config.cjs Implement a Tailwind content path wrapper (#1731) 2024-02-09 13:10:37 +01:00

Using Websockets in Wasp

This is an example real-time, Websockets app built with Wasp in TypeScript to showcase the ease of use and integration of Websockets in Wasp. It's really NEAT!

wasp websockets app

You can try out a deployed version of the app here: https://websockets-client-production.up.railway.app/

This app also includes Wasp's integrated auth and a voting system (again, neat!).

Running the app

If you get stuck at any point, feel free to join our Discord server and ask questions there. We are happy to help!

First, clone the this repo:

git clone https://github.com/wasp-lang/wasp.git

Make sure you've downloaded and installed Wasp

curl -sSL https://get.wasp-lang.dev/installer.sh | sh

Then navigate to the project directory

cd examples/websockets-realtime-voting
wasp db migrate-dev

start the app! (this also installs all dependencies)

wasp start

Check out the src/server/websocket.ts and src/client/pages/MainPage.tsx to see how Websockets are used in Wasp.

Need Help?

Wasp Docs: https://wasp-lang.dev/docs

Feel free to join our Discord server and ask questions there. We are happy to help!