Skip to content

Commit ca96a81

Browse files
committed
Update docs
1 parent fa0ae5c commit ca96a81

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ If you want to get all views for all ids, set the `all` query parameter to `true
5252

5353
### Database adapters
5454

55-
By default, `micro-analytics` uses `flat-file-db`, a fast in-process flat file database, which makes for easy setup and backups. _(change the path to the database with the `DB_PATH` env variable, e.g. `$ DB_PATH=storage/analytics.db micro-analytics`)_
55+
By default, `micro-analytics` uses `flat-file-db`, a fast in-process flat file database, which makes for easy setup and backups.
5656

5757
This works fine for side-project usage, but for a production application with bajillions of visitors you might want to use a real database with a _database adapter_. Install the necessary npm package (e.g. `micro-analytics-adapter-xyz`) and then specify the `DB_ADAPTER` environment variable: `$ DB_ADAPTER=xyz micro-analytics`
5858

writing-adapters.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
`micro-analytics` database adapters are simple JavaScript modules which export an object with some methods. They _have_ to be called `micro-analytics-adapter-xyz`, where `xyz` is the name users will pass to the `DB_ADAPTER` environment variable when starting `micro-analytics`.
44

5+
If you want to see an example adapter, check out the default [`flat-file-db` adapter](https://github.com/mxstbr/micro-analytics-adapter-flat-file-db)!
6+
57
## Overview
68

79
The methods every adapter has to have are:

0 commit comments

Comments
 (0)