diff options
| author | Fuwn <[email protected]> | 2024-05-06 14:14:12 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-05-06 14:14:12 -0700 |
| commit | fd7a427f88a4eb30069c5caf4c9a0ebf1359d10b (patch) | |
| tree | 1cbaf464eae3194fa014b4da5f7323ff88c6d0df /README.md | |
| parent | docs(readme): rename (diff) | |
| download | counter-master.tar.xz counter-master.zip | |
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 25 |
1 files changed, 11 insertions, 14 deletions
@@ -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 |