aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 5b0a909518d8059c2e86c1e4bd0220cb905c997a (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
# ☗ Counter

> 多种风格可选的萌萌计数器

<img src="https://counter.due.moe/get/@counter.github?theme=urushi" width="50%">

## Usage

### Local

```shell
$ git clone https://github.com/Fuwn/counter.git
$ cd counter
$ npm install # Or Bun, Yarn, pNPM, etc.
$ npm run start
```

### Docker

```yaml
docker run --volume 'counter:/app/data' -p '80:3000' --rm fuwn/urushi-counter:latest
```

### Database

`counter` will use SQLite by default, and will place the database file, `count.db`, within the `data/` directory of the root project folder.

#### MongoDB

To use MongoDB instead of SQLite, expose a `DB_URL` environment variable.

```shell
export DB_URL=mongodb+srv://user:[email protected]/counter
```

### Resource Attributions

*   [A-SOUL_Official](https://space.bilibili.com/703007996)
*   [Moebooru](https://github.com/moebooru/moebooru)
*   [Rule 34](https://rule34.xxx) (NSFW)
*   [Gelbooru](https://gelbooru.com) (NSFW)

### License

This project is licensed with the [MIT License](LICENSE).