Giter VIP home page Giter VIP logo

actionfps-log-stream's People

Contributors

jasbrake avatar

Watchers

 avatar  avatar  avatar

actionfps-log-stream's Issues

Publish to npmjs

So that I can run it with:

$ npm install -g actionfps-log-stream
$ AUTHORIZATION="..." actionfps-log-stream log-file.tsv

Depends on #1

Write after end

2017-09-27 02:27 +00:00: Error: write after end
    at writeAfterEnd (_stream_writable.js:234:12)
    at WriteStream.Writable.write (_stream_writable.js:285:5)
    at EventSource.eventSource.addEventListener (/usr/lib/node_modules/actionfps-log-stream/actionfps-log-stream.js:48:17)
    at emitOne (events.js:115:13)
    at EventSource.emit (events.js:210:7)
    at _emit (/usr/lib/node_modules/actionfps-log-stream/node_modules/eventsource/lib/eventsource.js:222:17)
    at parseEventStreamLine (/usr/lib/node_modules/actionfps-log-stream/node_modules/eventsource/lib/eventsource.js:237:9)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/actionfps-log-stream/node_modules/eventsource/lib/eventsource.js:200:11)
    at emitOne (events.js:115:13)
    at IncomingMessage.emit (events.js:210:7)

I think the issue is that I am ending the writeStream on an error event from the eventsource server.

Clean up README

  • ### is unsupported markdown for npmjs.com
  • Add a full example about how to run
  • Add example for running with PM2

Use environment variables for configuration & separate out argument

So that the user wouldn't need to modify config.js and so that publishing to npmjs would yield a self contained package.

Most important config option is AUTHORIZATION.

logFilePath on the other hand is an argument and not configuration (you can have multiple log files, but only one auth token typically).

Improve file error handling

Current Behavior

If you call the program without a file parameter, it will try to resolve the filepath of '' (empty string) and fail.

What it should do

It should: let the user know that they need to pass in a file path as a parameter in order to run it.

Also

Similarly, I need to decide whether it is best to leave File not found errors unhandled, or print a friendly error message and exit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.