Created
March 16, 2016 20:48
-
-
Save henriquemenezes/cb8528078d1229ed7837 to your computer and use it in GitHub Desktop.
Revisions
-
henriquemenezes revised this gist
Mar 16, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -32,7 +32,7 @@ $ http-server -p 8000 ### NodeJS (node-static) ```shell $ npm install -g node-static $ static -p 8000 ``` -
henriquemenezes created this gist
Mar 16, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,61 @@ # One-line Web Servers ### Python 2.x ```shell python -m SimpleHTTPServer 8080 ``` ### Python 3.x ```shell python -m http.server 8080 ``` ### Ruby 1.9.2+ ```shell ruby -run -e httpd . -p 8080 ``` ### PHP 5.4+ ```shell php -S 0.0.0.0:8080 ``` ### NodeJS (http-server) ```shell $ npm install -g http-server $ http-server -p 8000 ``` ### NodeJS (node-static) ```shell $ npm install -g node-static # install dependency $ static -p 8000 ``` ### Go (spark) ```shell $ go get github.com/rif/spark $ spark -port 8000 . ``` ### BusyBox ```shell $ busybox httpd -f -p 8000 ``` ### Webfsd ```shell $ webfsd -F -p 8000 ``` ## Credits - [Discussion on reddit](https://www.reddit.com/r/webdev/comments/1fs45z/list_of_ad_hoc_http_server_oneliners) - [willurd/web-servers.md gist](https://gist.github.com/willurd/5720255)