This was my project to try out Server-Sent Events as well as to improve my skills in SvelteKit.
Here's why I needed SSE for performace reasons:
Of course, this project is not optimized or perfect. But it taught me how to work with SSE and how create dynamic routing.
This site was build with only a few frameworks and library:
This are steps to setup the project locally.
npm install npm@latest -g
git clone https://github.com/Schmidii99/Sveltekit-SSE-TicTacToe.git
npm install
Start the project on your local maschine
npm run dev
open your browser on localhost:5173
Create a lobby
Copy the link to another browser or an incognito window to join your own game. This is due to the session being store in your local storage. Repeat this step again if you want to spectate the game.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions and improvements you make are greatly appreciated. This makes you and me a better developer.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Distributed under the MIT License. See LICENSE
for more information.
Florian Schmid - my website - mail@florianschmid.me
Project Link: https://github.com/Schmidii99/Sveltekit-SSE-TicTacToe/
Some links to credit those awesome projects that helped me.