node版:
// 安装:
npm install -g http-server
// 启动 http server
http-server &
// 启动 https server
http-server -p 8086 -S -K ./cert.key -C ./cert.pem
python版:
python -m SimpleHTTPServer 8888
如果是Python 3+
python3 -m http.server 8888
shell版:
nc命令
golang版:
$ go get -u github.com/shurcooL/goexec
$ goexec 'http.ListenAndServe(`:8080`,http.FileServer(http.Dir(`.`)))'
轻量级的http server
tinyhttpd:https://github.com/EZLippi/Tinyhttpd
(源码分析:https://blog.csdn.net/jcjc918/article/details/42129311)
Mongoose:https://github.com/cesanta/mongoose
官网: https://cesanta.com/
其他:
https://github.com/liigo/tinyweb/
https://github.com/Akagi201/libuv-webserver
https://github.com/haywire/haywire
https://github.com/h2o/h2o
https://github.com/emikulic/darkhttpd:
./darkhttpd ~/public_html --port 8081
docker run -p 8080:80 -v ~/dev/mywebsite:/var/www/htdocs:ro darkhttpd
http://www.acme.com/software/mini_httpd/
No comments:
Post a Comment