🤖No dependency, single script http server with custom controllers (for various debugging purposes)
MIT License
Created in 2018 - quite old now and not maintained
What's that?
It's just simple HTTP server with
Techniques:
It was written just in plain js without any bundlers to just serve files, but later it was extended gradually with more and more features. It supposed to be just dirty tool to do the job from one file, for some testing. What I'm trying to say is: It's ugly and I never had intention to make it pretty. But it was still fun to build it at some point.
npx npx-server@latest
or
npx npx-server server.js
or
npx npx-server [server_file_name.js] [controllers_directory]
Server have no XSS protection and might have other security issues. In wrong hands, badly managed it might present security thread.
Script is mostly created for local development/testing purposes with main goal to quickly bring it where it is needed and launch without dependencies.
I wouldn't recommend it to use on production.
Simple equivalent in python would be:
python -m http.server 8000
# or
python -m SimpleHTTPServer 8000