web-server-here
v0.1.1
Published
Windows File Explorer context menu items for starting and stopping local static web servers.
Maintainers
Readme
Web-Server-Here
Windows File Explorer context menu items for quickly serving a folder with a local static web server.
It adds a Web-Server-Here context menu group for folders and folder backgrounds, with these actions:
Start ServerStop ServerStop all Servers
The server is provided by the open source http-server package. This project only wires it into Explorer, tracks the processes it starts, and stops those tracked processes later.
At a Glance
| | |
| ---------------------------- | ---------------------------------------------------------------------------------------- |
| Starts servers from Explorer | Right-click a folder or folder background and choose Web-Server-Here > Start Server. |
| Uses free ports | Multiple folders can be served at the same time. |
| Local only | Servers bind to 127.0.0.1. |
| No admin required | Context menu entries are installed per user under HKCU\Software\Classes. |
| No custom web server | Static serving is delegated to http-server. |
Requirements
- Windows
- Node.js 18 or newer
- Windows Script Host (
wscript.exe) - Windows PowerShell (
powershell.exe)
This project is Windows-only. The CLI exits with an error on any other platform, and the npm
postinstallhook skips Explorer context-menu installation outside Windows.
Quick Start
npm install --global web-server-hereFor global package installations on Windows, the Explorer context menu is installed automatically.
If you want to install the package without installing the context menu items, execute:
$env:WEB_SERVER_HERE_NO_CONTEXT_MENU = "1"
npm install --global web-server-hereThen install the context menu later:
web-server-here installThen right-click a folder in File Explorer and choose Web-Server-Here > Start Server.
Explorer actions show short Windows notifications when servers are started or stopped.
Notifications are sent with node-notifier and use the app id rent-a-developer.WebServerHere.
To disable the notifications, set set WEB_SERVER_HERE_NO_NOTIFICATIONS to 1 as a user environment variable and restart Explorer or sign in again.
Uninstall
Run both commands:
web-server-here uninstall
npm uninstall --global web-server-hereThe manual web-server-here uninstall step is needed because npm v7 and newer do not run uninstall lifecycle scripts. The uninstall command stops servers started by this tool and removes the Explorer context menu entries.
Usage
From File Explorer
Right-click a folder, open Web-Server-Here, and choose Start Server.
You can also right-click the empty background area inside an open folder, open Web-Server-Here, and choose Start Server to serve that current folder.
The tool starts a local static web server bound to 127.0.0.1, chooses a free port automatically, and opens the site in your default browser. You can start servers for multiple folders at the same time.
Use Stop Server on a folder or folder background to stop the server tracked for that folder.
Use Stop all Servers to stop every server tracked by this tool.
From the CLI
web-server-here install
web-server-here uninstall
web-server-here start --folder <folder> [--open-browser]
web-server-here stop --folder <folder>
web-server-here stop-all
web-server-here listNotes
- Context menu entries are installed per user under
HKCU\Software\Classes, so admin rights are not required. - The context menu items are installed for folders and for the empty background area inside folders.
- Explorer context menu items launch the CLI through a small
wscript.exehelper to avoid flashing a console window. - Running servers are tracked in
%LOCALAPPDATA%\Web-Server-Here\servers.json. - Windows PowerShell is used to verify a tracked server process command line before stopping it.
web-server-here installregistersHKCU\Software\Classes\AppUserModelId\rent-a-developer.WebServerHerefor Windows toast notifications.- Toast notifications are shown by a detached helper process, so Explorer actions do not wait for the toast to close.
- Servers bind to
127.0.0.1only. - The tool stops only server processes it has tracked.
- It does not install a tray app, background service, COM shell extension, HTTPS support, or custom web server.
- Context menu icons are included in the package. See
THIRD_PARTY_NOTICES.mdfor attribution.
Local Testing Before Publishing
You can test the package locally without publishing it to npmjs.com.
From the project folder:
npm run local:testThat installs dependencies, runs tests, removes any existing global install, installs this checkout globally, and runs the same postinstall hook that a published global install would run.
Useful local development scripts:
npm run local:cleanup # uninstall context menu entries and remove the global package
npm run local:install # install this checkout globally
npm run local:reinstall # cleanup, then install this checkout globally
npm run local:refresh-menu # recreate only the Explorer context menu entries
npm run local:test # npm ci, tests, cleanup, global installTo force-refresh the Explorer menu after changing registry code or icon files:
npm run local:refresh-menuThen test the CLI:
web-server-here start --folder "C:\path\to\some\folder" --open-browser
web-server-here list
web-server-here stop --folder "C:\path\to\some\folder"And test Explorer:
- Create a folder with an
index.htmlfile. - Right-click the folder and use
Web-Server-Here>Start Server. - Right-click inside the empty background area of an open folder and use
Web-Server-Here>Start Server. - Use
Stop ServerorStop all Serversto clean up.
For a closer package-install test, run:
npm pack
npm install --global .\web-server-here-0.1.0.tgzClean up after local testing:
npm run local:cleanupMaintainer Release
CI runs on pushes and pull requests.
Publishing runs when a version tag matching v* is pushed and the tagged commit is contained in origin/main.
Example release:
npm version patch
git push origin main --follow-tagsLicense
Released under the MIT License. © 2026 David Liebeherr.
Author
David Liebeherr — rent-a-developer 📧 [email protected]
If this library saves you time, a ⭐ on GitHub is appreciated!
