tariqbuilds / linux-dash

A beautiful web dashboard for Linux
https://afaqurk.github.io/linux-dash/
MIT License
10.43k stars 1.2k forks source link

added bin script file + port settings from env variable #421

Closed noygal closed 7 years ago

noygal commented 7 years ago

A minimal changes to make the package to run and configured as a global.

npm i -g https://github.com/noygal/linux-dash.git#feature/bin-v2.0
export PORT=8080
linux-dash
tariqbuilds commented 7 years ago

@noygal This is great. Please see @Simounet 's commit PR for some minor but important changes to the name of the environment variable: https://github.com/afaqurk/linux-dash/pull/407

It might be worth just copying his changes over to this branch. When you update your PR, I'll merge it in.

noygal commented 7 years ago

@afaqurk done! btw what do you think about publish this on npm? If you don't want the hassle I don't mind doing it, even automate that whole thing so no manual labor would be required on your part.

tariqbuilds commented 7 years ago

@noygal That is a good thought but npm is a dependency package manager for Node.js and not intended to be an application distributor. Also, by introducing it there, it also puts the onus on the project to always be security conscious since npm will allow anything to be installed globally with little regard. Those are, to me, some compelling reasons not to introduce that surface area to Linux Dash's installation method.

That being said, how would you automate it?

noygal commented 7 years ago

@afaqurk Actually npm is totally agnostic to nodejs, you can pretty much achieve any dev flow with it, regardless to your tech stack, every bin file noted in the package.json will be available from the command line if the module is installed globally (same behaviour as npm scripts, the only real different is the node_module location), I use those feature in all my nodejs cli tools.

As for the security risks in npm are well know for professional users and enterprise level apps uses private/local npm registry with code signing and verification, and if I could be honest, I don't think this is a major concern for the users of this project, maybe I just viewing it from my perspective as a nodejs developer, but for my it just a great little drop in for my local/dev/private servers, for production level application I always use dedicate tools/services.

For continues deployment, I know my way around jenkins, but I wanted to try out travis ci, seems pretty simple follow git hook + running npm publish.