https://www.reddit.com/r/HermitCraft/comments/10wksaw/hctcg_online/
Use Node.js 16-18 (19+ is not supported).
If you don't have Node.js yet we recommend using nvm.
npm ciPlease use npm ci instead of npm install to avoid unnecesary changes in package-lock.json.
To create a build for frontend:
npm run buildTo run the server:
npm startYou can configureyour instance using the config/server-config.json file.
| Key | Description |
|---|---|
| port | Server port |
| clientDevPort | Port for vite dev. server |
| cors | Useful when testing on local network or when your server runs on a different domain |
| world | Identifier for your instance when tracking stats |
| limits | Limits for players' decks |
| logoSubText | Animated text to show next to logo |
To run frontend in development mode:
npm run devWe run lint/prettier/tsc as part of the PR process. However if you want to avoid back and forth we recommend adding a pre-commit hook that will test this for you locally every time you create a new commit:
npm run huskyWe also recommend to run prettier on save in your editor, this is an example configuration using the prettier extension for VSCode: