aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md25
1 files changed, 11 insertions, 14 deletions
diff --git a/README.md b/README.md
index 0749fbc..5b0a909 100644
--- a/README.md
+++ b/README.md
@@ -4,36 +4,33 @@
<img src="https://counter.due.moe/get/@counter.github?theme=urushi" width="50%">
-## Installation
+## Usage
-### Self-hosting
+### Local
```shell
$ git clone https://github.com/Fuwn/counter.git
$ cd counter
-$ yarn install
-$ yarn start
+$ npm install # Or Bun, Yarn, pNPM, etc.
+$ npm run start
```
-### Configuration
+### Docker
```yaml
-# config.yml
+docker run --volume 'counter:/app/data' -p '80:3000' --rm fuwn/urushi-counter:latest
+```
-app:
- # site: https://counter.due.moe
- port: 3000
+### Database
-db:
- type: sqlite # sqlite, mongodb
-```
+`counter` will use SQLite by default, and will place the database file, `count.db`, within the `data/` directory of the root project folder.
#### MongoDB
-Expose a `DB_URL` environment variable
+To use MongoDB instead of SQLite, expose a `DB_URL` environment variable.
```shell
-export DB_URL=mongodb+srv://user:passwd@***.***.***.mongodb.net/db_count
+export DB_URL=mongodb+srv://user:[email protected]/counter
```
### Resource Attributions