actionfps-clone-logs

1.0.2 • Public • Published

actionfps-clone-logs

Clone live ActionFPS logs into a file.

NPM

Rationale

In order to turn ActionFPS into a platform, we need to share raw logs with the potential users, and we'd also like to do it live because there are some use cases where only live data is useful.

The simplest solution with features like authentication that is available is EventSource over HTTP/S.

EventSource is supported by Node.js and HTML5/Google Chrome, and ActionFPS supplies these events live using an HTTPS endpoint

The project is written in Scala.js and is based on scalajs-cli-demo.

Node/JavaScript platform is chosen because it is a good distribution platform with easy access.

Scala is chosen as this is what ActionFPS is built on and provides great testing and refactoring capabilities.

Usage

Use the pre-built npmjs package.

$ npm install -g actionfps-clone-logs
$ touch actionfps.tsv
$ actionfps-clone-logs actionfps.tsv
Reading file actionfps.tsv...
Resuming from time 2016-01-02T03:04:05Z, with 0 lines at this time

Authorization

An authorization token can be specified via an environment variable:

$ AUTHORIZATION="Bearer xyz..." actionfps-clone-logs actionfps.tsv

This may let you see full IP addresses for example.

Authorization with .netrc

You can also place your token in .netrc as such:

$ cat ~/.netrc
machine actionfps.com
    password xyz...

Default start time

DEFAULT_START_TIME (ISO8601 datetime) can be specified for a default start of the stream.

This may be useful if you aren't interested in very historical data.

Development

I recommend IntelliJ IDEA.

To continuously test inside SBT, run: ~test.

To test app locally, run:

$ sbt publishLocal
$ ./bin/actionfps-clone-logs

Publishing

Requires SBT.

$ npm publish

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    4
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    4
  • 1.0.0
    0

Package Sidebar

Install

npm i actionfps-clone-logs

Weekly Downloads

4

Version

1.0.2

License

ISC

Last publish

Collaborators

  • scalawilliam