Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/typicode/stop-server
:iphone: Shut down your computer with your phone
https://github.com/typicode/stop-server
Last synced: 5 days ago
JSON representation
:iphone: Shut down your computer with your phone
- Host: GitHub
- URL: https://github.com/typicode/stop-server
- Owner: typicode
- License: mit
- Created: 2015-08-25T15:49:47.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-08-08T14:54:11.000Z (over 3 years ago)
- Last Synced: 2024-10-22T19:19:35.919Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 24.4 KB
- Stars: 348
- Watchers: 19
- Forks: 42
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# stop-server [](https://www.npmjs.com/package/stop-server) [](https://travis-ci.org/typicode/stop-server)
> Shut down your computer with your phone :iphone: (works on OS X, Linux and Windows)
## Install
```sh
npm install -g stop-server
``````sh
stop-server start # Need to be done only once
```## Usage
Visit [`http://your-local-ip:5709`](http://localhost:5709/qr.html) __on your phone__. You should see this page:

__Important__ if you're on OS X or Linux, you need to allow commands to be used without sudo:
```bash
# 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:5709/qr.html](http://localhost:5709/qr.html) from your computer
## Uninstall
```
npm rm -g stop-server
```## How it works?
`stop-server` is a simple Express server with only 2 routes:
```
POST http://your-local-ip:5709/power-off
POST http://your-local-ip:5709/sleep
```## License
MIT - [typicode :cactus:](https://github.com/typicode/stop-server)