Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/HugoDF/micro-analytics-events
A microservice to record analytics events to SQLite3
https://github.com/HugoDF/micro-analytics-events
analytics analytics-track glitch micro microservice nodejs sqlite
Last synced: about 2 months ago
JSON representation
A microservice to record analytics events to SQLite3
- Host: GitHub
- URL: https://github.com/HugoDF/micro-analytics-events
- Owner: HugoDF
- License: mit
- Archived: true
- Created: 2019-09-07T18:47:48.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T19:36:01.000Z (about 2 years ago)
- Last Synced: 2024-08-04T00:12:54.214Z (5 months ago)
- Topics: analytics, analytics-track, glitch, micro, microservice, nodejs, sqlite
- Language: JavaScript
- Homepage: https://codewithhugo.com/micro-analytics-events-sqlite/
- Size: 896 KB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-micro - micro-analytics-events - A service to record analytics events to SQLite3 (Built with Micro / Utilities)
README
## Requirements
- Node 10
- Yarn 1.x or npm
- SQLite3## Setup
1. Clone the repository
2. Run `yarn` or `npm install` installs all required dependencies.
3. Run `node setup.js` to create the SQLite3 database at `.date/main.db`## npm scripts
> Equivalent `npm run ` should also work
- `yarn dev` will start micro in dev mode using [micro-dev](https://github.com/zeit/micro-dev)
- `yarn start` will start [micro](https://github.com/zeit/micro) in production mode on the port defined by PORT environment variable (default 3000)
- `prestart` runs `setup.js` which will the SQLite3 events table if it doesn't exist.
- `yarn reset` **DANGER** will remove and re-initialise the SQLite3 database
- `yarn lint` will lint all of the files with [xo](https://github.com/xojs/xo)
- `yarn format` will run lint with `--fix` option on all the examples files (and tests).## Deploying
### On Glitch
This was designed to run on glitch.com, hence the use of SQLite3.
You can remix it directly from https://glitch.com/~interesting-protocol or deploy from this repository/your fork using Glitch's GitHub import feature.
## LICENSE
Code is licensed under the [MIT License](./LICENSE).