Git Product home page Git Product logo

node-autostart's Introduction

Due to tight resources and serious issues with this project, I'm deprecating it. I highly recommend auto-launch, it has a similar API and should be easy to switch over to. Sorry for the circumstances.

node-autostart

Build Status Build status Coverage Status Dependency Status devDependency Status npm

node-autostart is a Node.js module that enables your module to activate autostart easily. You can also use it as a global module to set-up autostart for anything and anywhere via the command line interface (CLI). Currently, it supports:

  • Linux
  • OS X
  • Windows

Install:

npm install -g node-autostart

for use in CLI, and:

npm install --save node-autostart

as a dependency for your module.

Documentation

You can use node-autostart both programmatically and per CLI. 'Enabling autostart' means to make the OS run a certain command at logon of the user who 'enabled the autostart' via a program. The command could be, for example, npm start in a certain directory, or whatever floats your boat. Here's an example for use via the CLI:

  autostart enable -n "MyAwesomeApp" -p "/home/me/MyAwesomeApp" -c "npm start"

to enable,

  autostart check -n "MyAwesomeApp"

to see if it is enabled, and:

  autostart disable -n "MyAwesomeApp"

to disable it. To use it inside your Node.js app, look at the API for Programmatic Use, if you want to use it in the CLI, use autostart -h for further information.

API for Programmatic Use

First, require this module inside your app like this:

var autostart = require('node-autostart')

Now, you can simply enable autostart and disable it, and you can also check if it is enabled:

autostart.enableAutostart(key, command, path, function (err) {
  if(err) console.error(err);
})

autostart.disableAutostart(key, function (err) {
  if(err) console.error(err);
})

autostart.isAutostartEnabled(key, function (err, isEnabled) {
  if(err) console.error(err);

  if(isEnabled) {
    console.log('Autostart is enabled');
  }
  else {
    console.log('Autostart is not enabled');
  }

})

If you wish, you can also use Promises instead of Callbacks:

autostart.enableAutostart(key, command, path).then(() => {
  // Success!
}).catch((err) => {
  console.error(err);
  // Something bad happened
});

autostart.disableAutostart(key).then(() => {
  // Success!
}).catch((err) => {
  console.error(err);
  // Something bad happened
});

autostart.isAutostartEnabled(key).then((isEnabled) => {
  console.log('Autostart is ' + isEnabled ? 'enabled' : 'not enabled');
  // Success!
}).catch((err) => {
  console.error(err);
  // Something bad happened
});

Variables

key: Unique identifier for startup items (always required! (Make it unique))

command: Command to be executed in the specified path

path: Place in which the command will be executed (Use process.cwd() if you just want it to happen in your current working directory)

Functions

.enableAutostart Requires key, command and path, returns err.

.disableAutostart Requires key, returns err.

.isAutostartEnabled Requires key, returns err and isEnabled.

License

The MIT License (MIT)

Copyright (c) 2015 Max RittmΓΌller

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

node-autostart's People

Contributors

greenkeeper[bot] avatar greenkeeperio-bot avatar maruware avatar maxrimue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

node-autostart's Issues

An in-range update of yargs is breaking the build 🚨

Version 7.1.0 of yargs just got published.

Branch Build failing 🚨
Dependency yargs
Current Version 7.0.2
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As yargs is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • βœ… dependency-ci Dependencies checked Details

  • βœ… continuous-integration/appveyor/branch AppVeyor build succeeded Details

  • ❌ coverage/coveralls Coverage pending from Coveralls.io Details

  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details

Commits

The new version differs by 8 commits .

  • e7359d6 chore(release): 7.1.0
  • c357412 docs: switch to conventional commits badge [ci skip] (#850)
  • 17e89bd fix: we shouldn't output help if we've printed a prior help-like message (#847)
  • 50c9acd chore: add editorconfig (#848)
  • 360e301 fix: get terminalWidth in non interactive mode no longer causes a validation exception (#837)
  • fde0564 feat: add support for numeric commands (#825)
  • c748dd2 fix: fix demandOption no longer treats 'false' as truthy (#829)
  • e0b4efb test: Made unit test passing with node-chakracore

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of coveralls is breaking the build 🚨

Version 2.13.0 of coveralls just got published.

Branch Build failing 🚨
Dependency coveralls
Current Version 2.12.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As coveralls is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • βœ… dependency-ci Dependencies checked Details

  • βœ… continuous-integration/appveyor/branch AppVeyor build succeeded Details

  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details

  • βœ… coverage/coveralls First build on greenkeeper/coveralls-2.13.0 at 100.0% Details

Commits

The new version differs by 4 commits .

  • 2821200 version bump
  • ef7e811 Parse commit from packed refs if not available in refs dir. (#163)
  • e476964 Merge pull request #162 from evanjbowling/patch-1
  • 63a7f92 Update README.md

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

OS compatability/tested list?

Firstly, I 'd like to say that I'm a big fan of this kind of projects!

I saw that you use a cronjob on linux with @reboot, I know there were some issues with that on various systems and versions of crontab... So my question is do you have a list of OS versions this library works with? (windows, mac, linux)

If so, add it to your readme.

An in-range update of mock-fs is breaking the build 🚨

Version 4.3.0 of mock-fs just got published.

Branch Build failing 🚨
Dependency mock-fs
Current Version 4.2.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

mock-fs is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ

Status Details - βœ… **dependency-ci** Dependencies checked [Details](https://dependencyci.com/builds/203032),- βœ… **continuous-integration/appveyor/branch** AppVeyor build succeeded [Details](https://ci.appveyor.com/project/maxrimue/node-autostart/build/329),- ❌ **coverage/coveralls** Coverage pending from Coveralls.io [Details](https://coveralls.io/builds/11309153),- ❌ **continuous-integration/travis-ci/push** The Travis CI build failed [Details](https://travis-ci.org/maxrimue/node-autostart/builds/227378927?utm_source=github_status&utm_medium=notification)

Commits

The new version differs by 4 commits0.

false

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of coveralls is breaking the build 🚨

Version 2.12.0 of coveralls just got published.

Branch Build failing 🚨
Dependency coveralls
Current Version 2.11.16
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As coveralls is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • βœ… dependency-ci Dependencies checked Details

  • βœ… continuous-integration/appveyor/branch AppVeyor build succeeded Details

  • βœ… continuous-integration/travis-ci/push The Travis CI build passed Details

  • ❌ coverage/coveralls First build on greenkeeper/coveralls-2.12.0 at 99.371% Details

Release Notes Branch coverage support

Adds branch coverage data to Coveralls API post.

Commits

The new version differs by 2 commits .

See the full diff.

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of coveralls is breaking the build 🚨

Version 2.13.2 of coveralls just got published.

Branch Build failing 🚨
Dependency coveralls
Current Version 2.13.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As coveralls is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • βœ… dependency-ci Dependencies checked Details
  • βœ… continuous-integration/appveyor/branch AppVeyor build succeeded Details
  • ❌ coverage/coveralls Coverage pending from Coveralls.io Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details

Commits

The new version differs by 3 commits.

  • 5ebe57f bump version
  • 428780c Expand allowed dependency versions to all API compatible versions (#172)
  • eb1b723 Update Mocha link (#169)

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

MacOS startup issue when running as root.

First off, thanks so much for creating this library. It is helping me out big time, but I seem to be an edge case. I need to run my node application as root. When I try to create the startup file on MacOS the framework attempts to put the file into /Users/root/Library/LaunchAgents/ which does not exist. I have the code locally and have made the change to allow for the specifying of the username, but I figured I'd let you know anyway since this is an issue.

An in-range update of nyc is breaking the build 🚨

Version 10.3.2 of nyc just got published.

Branch Build failing 🚨
Dependency nyc
Current Version 10.3.1
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As nyc is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • βœ… dependency-ci Dependencies checked Details,- βœ… continuous-integration/appveyor/branch AppVeyor build succeeded Details,- ❌ continuous-integration/travis-ci/push The Travis CI build failed Details,- βœ… coverage/coveralls First build on greenkeeper/nyc-10.3.2 at 100.0% Details

Commits

The new version differs by 2 commits0.

  • e062a86 chore(release): 10.3.2
  • 213206f fix: we should not create a cache folder if cache is false (#567)

false

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

add autostart run once

Would be helpful if the cli would ask $user if he'd like to run the command, after it's added. Or simply do it ;)

An in-range update of mock-fs is breaking the build 🚨

Version 4.4.1 of mock-fs just got published.

Branch Build failing 🚨
Dependency mock-fs
Current Version 4.4.0
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

mock-fs is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • βœ… dependency-ci Dependencies checked Details
  • βœ… continuous-integration/appveyor/branch AppVeyor build succeeded Details
  • βœ… coverage/coveralls First build on greenkeeper/mock-fs-4.4.1 at 100.0% Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details

Commits

The new version differs by 2 commits.

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of nyc is breaking the build 🚨

Version 10.3.0 of nyc just got published.

Branch Build failing 🚨
Dependency nyc
Current Version 10.2.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As nyc is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details - βœ… **dependency-ci** Dependencies checked [Details](https://dependencyci.com/builds/202416),- βœ… **continuous-integration/appveyor/branch** AppVeyor build succeeded [Details](https://ci.appveyor.com/project/maxrimue/node-autostart/build/327),- ❌ **continuous-integration/travis-ci/push** The Travis CI build failed [Details](https://travis-ci.org/maxrimue/node-autostart/builds/227079526?utm_source=github_status&utm_medium=notification),- βœ… **coverage/coveralls** First build on greenkeeper/nyc-10.3.0 at 100.0% [Details](https://coveralls.io/builds/11301100)

Commits

The new version differs by 4 commits ahead by 4, behind by 2.

  • 55e826d chore(release): 10.3.0
  • 89dc7a6 chore: explicit update of istanbul dependnecies (#562)
  • 1887d1c feat: add support for --no-clean, to disable deleting raw coverage output (#558)
  • ff73b18 fix: source-maps were not being cached in the parent process when --all was being used (#556)

false

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

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.