No description
Find a file
2021-06-05 11:08:06 +02:00
build fix styles 2021-06-05 11:08:06 +02:00
example-images change dir stucture 2021-05-01 00:16:08 +02:00
scripts add linting, do more type hinting 2021-05-29 17:58:05 +02:00
src fix styles 2021-06-05 11:08:06 +02:00
tests rng class.. 2020-12-21 18:34:57 +01:00
.editorconfig dirty initial commit 2020-11-07 11:35:29 +01:00
.eslintignore add linting, do more type hinting 2021-05-29 17:58:05 +02:00
.eslintrc.cjs add linting, do more type hinting 2021-05-29 17:58:05 +02:00
.gitignore switch to typescript 2021-05-17 00:27:47 +02:00
config.example.json switch to typescript 2021-05-17 00:27:47 +02:00
package-lock.json add linting, do more type hinting 2021-05-29 17:58:05 +02:00
package.json add linting, do more type hinting 2021-05-29 17:58:05 +02:00
README.md add readme and change some scripts 2021-05-22 13:19:39 +02:00
rollup.server.config.js add linting, do more type hinting 2021-05-29 17:58:05 +02:00
run better run script 2021-04-13 19:48:18 +02:00
tsconfig.json categorys and titles for images 2021-05-22 01:51:44 +02:00
vite.config.js add ability to update image info 2021-05-22 14:26:04 +02:00

puzzle

This is a multiplayer puzzle game running in the browser. See a live version at jigsaw.hyottoko.club.

Get Started

Note: node ^14.17.0 and npm ^7.14.0 are required. You can try with lower versions, but it may not work.

Quick start

This will install the dependencies, execute build and start the server.

./run start

Manual start

There are other run scripts:

command explanation
./run install installs dependencies and sets up a config if none exists
./run build builds the sources
./run server runs the server with built files
./run tests runs tests
./run start combination of install, build and server
./run dev-server runs the dev server (from unbuilt files)
./run dev-frontend runs the dev frontend (with hmr and such)
./run ts [...ARGS] run node, but with ts files. eg ./run ts scripts/import_images.ts

Dev

For development it makes sense to run both dev-server and dev-frontend in separate shells.

./run dev-server
./run dev-frontend

The dev-frontend script will output something like:

  vite v2.3.3 dev server running at:

  > Local: http://localhost:3000/
  > Network: use `--host` to expose

  ready in 465ms.

Try opening the url that is output. The frontend will proxy the following to the dev server:

  • api
  • image serving
  • image uploading

The frontend on its own will have hot module reload (HMR) available in this mode. Try changing a file inside src/frontend and see it update without running an extra command.

The server will restart when a change is made on the server code.

Then open the url output by the dev-frontend command, eg. http://localhost:3000.

Database

The database will automatically created in data/db.sqlite.