Danh mục

typicode/stop-server

:iphone: Shut down your computer with your phone

snapshot · 26/10/2026
TS

typicode/stop-server

JavaScript · danh tính provisional_slug_only

:iphone: Shut down your computer with your phone

Sao—lịch sử sao
Hạng—snapshot toàn cục
Fork38bản ghi nguồn
Số ngày trending1lịch sử xu hướng
Snapshot chỉ có lịch sử sao đầy đủ của star-history/star-history. Lịch sử thiếu thì không vẽ.

README

Từ GitHub · lưu tạm tối đa 7 ngày

stop-server

Shut down your computer with your phone 📱 (works on OS X, Linux and Windows)

Install

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

Usage

Visit http://your-local-ip:5709 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:

# 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 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 🌵