Skip to content
A microservice to record analytics events to SQLite3
JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.data
.github/workflows
.editorconfig
.gitignore
LICENSE
README.md
check-auth.js
cors.js
db.js
handler.js
index.js
package.json
setup.js
test.html
yarn.lock

README.md

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 <script> should also work

  • yarn dev will start micro in dev mode using micro-dev
  • yarn start will start 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
  • 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.

You can’t perform that action at this time.