0.2.0 • Published 4 years ago

our-stop-server v0.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

stop-server npm.io npm.io

Shut down your computer with your phone :iphone: (works on OS X, Linux and Windows), and execute .bat file from your path

Install

npm install -g our-stop-server
our-stop-server start # Need to be done only once

Usage

Visit http://your-local-ip:5708 on your phone. You should see this page:

npm.io

Important if you're on OS X or Linux, you need to allow commands to be used without sudo:

# Run 'sudo visudo' and add
your-username ALL=NOPASSWD: /sbin/shutdown       # OS X and Linux
your-username ALL=NOPASSWD: /usr/sbin/pm-suspend # Linux only

Tip for easier access, you can get a QR code by going to http://localhost:5708/qr.html from your computer

Uninstall

npm rm -g our-stop-server

How it works?

our-stop-server is a simple Express server with only 2 routes:

POST http://your-local-ip:5708/power-off
POST http://your-local-ip:5708/sleep
GET  http://your-local-ip:5708/open?path=your-path

License

MIT

0.2.0

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago