Player side |
Game master side |
Front-end: SvelteKit combined with typescript for the framework, with Tailwind CSS and SCSS for dynamic styles using @apply
and mixins
.
Back-end: SvelteKit does the job quickly but it's really express and socket.io that brings the power for a custom production server allowing advanced routing and sockets together.
I used 8ctopotamus/sveltekit-socketio-chat repo as a base and scratched the entire content to build my app on top. I won so much time over the overall setup time.
Install packages with your favorite package manager. I use pnpm to cache my downloaded packages and go faster:
pnpm install
You can then start the development server:
pnpm run dev
Open hosts with --host
to expose your dev server on the network:
pnpm run dev --host 0.0.0.0
To create a production version of your app:
pnpm run build
To start prod server, you need to run the built production version:
node build/index.prod.js
or
npm run prod
You can use environment variables like HOST
, PORTS
and SOCKET_PATH
to personalize exposed network interface and port.