First bits of pure lustre-javascript for user login session
This commit is contained in:
parent
a1e4eb1dff
commit
e6851255dc
41 changed files with 8413 additions and 733 deletions
46
README.md
46
README.md
|
|
@ -8,17 +8,39 @@ was, will show up on everyones screen.
|
|||
|
||||
Not quite finished yet, it is at a point where it is "usable" enough.
|
||||
|
||||
There are two endpoints to use:
|
||||
| / |endpoint for "regular" players.
|
||||
| /control | endpoint for person controlling the quiz. Same interface as for regular players, but with possiblity to control when to reveal answers and when to move on to next question. This gives the possiblity for the person asking the question to also provide answers, but the controls will work even if there is no player joined from this page.
|
||||
Endpoints explained
|
||||
|
||||

|
||||
| Endpoint | Usage |
|
||||
|--------------------------|--------------------------------------------------------------|
|
||||
| /room/<room_id> | Create room with given room_id (max 200 rooms) |
|
||||
| /board/<room_id> | Join a game with the given room_id |
|
||||
| /board/<room_id>/control | Join a game with the given room_id with more control options |
|
||||
|
||||
Next steps are:
|
||||
- Display questions. Currently, Quizterm only asks user to provide answer, the actual question needs to be asked
|
||||
elsewhere. This is often not a problem, since questions are asked on site, or in streamed meetings.
|
||||
- Make it a little harder to join a quiz. So far, a quiz is open, and anyone that knows the URL can easily join.
|
||||
A good idea to deploy to a disposable URL.
|
||||
- Bad handling of players with the same name. If a player register with a name that is already in used, two players
|
||||
will "compete" about being this player. You need to make sure to register with a different name than those already in
|
||||
use. As all "in use" names are displayed on your screen, this is somewhat doable.
|
||||
|
||||
| Ingame example | Idle player |
|
||||
|--------------------------|--------------------------|
|
||||
|  |  |
|
||||
|
||||
### Building and running
|
||||
|
||||
Docker, or a compatible container manager, like podman, is required to build and run
|
||||
quizterm. The alternative is to install Gleam and Erlang/BEAM and run it dockerless.
|
||||
Unless you plan to do Gleam development, using Docker will save a lot of hassle.
|
||||
|
||||
To compile project and build docker image, write:
|
||||
```
|
||||
docker build . -t quizterm:1
|
||||
```
|
||||
quizterm can be whatever name you want to give the container, 1 can be
|
||||
changed to whatever you want the version of the container to be.
|
||||
|
||||
Start server on port 4321:
|
||||
```
|
||||
docker run -p 4321:1234 quizterm:1
|
||||
```
|
||||
|
||||
Port 1234 is the port used internally in the docker container, while 4321
|
||||
is the port exposed outside the container. The latter can be set to whatever
|
||||
port you want to use.
|
||||
|
||||
Open web browser and access http://localhost:4321
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue