aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: d9dda4c806d356aa4809cfeebcefed1c6f2b4f28 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Hitler Clicker

Hitler Clicker is a simple game where you have to choose one of 3 teams to click for.
The team with the most clicks wins, except that the game is endless.

This project is licensed under **AGPLv3-or-later**.
See `LICENSE.md` for more information.

- - -

## Test Environment

There is an included testing environment. Requirements are Docker and PHP.
Docker is generally not needed, you can replace it with any other DB Server.
PHP has to have the `pdo_mysql` driver enabled.

```sh
# start mariadb
cd ./backend/docker-test-env/
docker compose up -d

# start api
cd .. #./backend/
php -S localhost:8000

# start frontend
cd ../frontend/
npm i
npm run dev
```

You send requests to the API like this:

```sh
curl -X POST -d '{ "key": "value" }' http://localhost:8000/yourapifile.php
```

`index.php` automatically creates the required database tables if they do not already exist, so just request that API to have everything set up for you.

## To-Do

### Backend

- add name and password change
- add anonymous clicking for a team

### Frontend

- frontend