wasp/examples/websockets-realtime-voting
2024-02-21 16:12:52 +01:00
..
migrations Migrated examples/websockets-realtime-voting to 0.12. (#1771) 2024-02-19 10:27:31 +01:00
public Migrated examples/websockets-realtime-voting to 0.12. (#1771) 2024-02-19 10:27:31 +01:00
src Migrated examples/websockets-realtime-voting to 0.12. (#1771) 2024-02-19 10:27:31 +01:00
.gitignore Migrated examples/websockets-realtime-voting to 0.12. (#1771) 2024-02-19 10:27:31 +01:00
.waspignore Migrated examples/websockets-realtime-voting to 0.12. (#1771) 2024-02-19 10:27:31 +01: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 Migrated examples/websockets-realtime-voting to 0.12. (#1771) 2024-02-19 10:27:31 +01:00
package-lock.json Migrated examples/websockets-realtime-voting to 0.12. (#1771) 2024-02-19 10:27:31 +01:00
package.json Migrated examples/websockets-realtime-voting to 0.12. (#1771) 2024-02-19 10:27:31 +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 Moves resolveProjectPath to wasp/dev (#1759) 2024-02-13 18:27:26 +01:00
tsconfig.json Uses extends in the user land tsconfig.json (#1793) 2024-02-21 16:12:52 +01:00
vite.config.ts Migrated examples/websockets-realtime-voting to 0.12. (#1771) 2024-02-19 10:27:31 +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!