serve current directory from command line
#Simplest way possible (thanks Aaron Patterson/n0kada):
ruby -run -e httpd . -p 9090
# I have this in my .bashrc :
function serve {
port="${1:-3000}"
ruby -run -e httpd . -p $port
}
# It serves the current directory on port 3000 by default, but you can also specify the port:
~ $ cd tmp
~/tmp $ serve # ~/tmp served on port 3000
~/tmp $ cd ../www
~/www $ serve 5000 # ~/www served on port 5000
Also in Shell:
- centos 7 install docker compose
- ubuntu delete a symbolic link
- linux vim set tab to 4 spaces
- How to upload a files to a repository on github using gitbash
- pip3 install from git
- how to change dotnet version
- disable open file explorer erverytime i connect usb ubuntu
- get serial number for server using powreshell
- how to run shell script
- how to check git repository link
- how to install pyqt5 dev tools
- hide ls: cannot read symbolic link Permission denied
- grep line number in linux
- laravel create model
- php apache "You do not have permission to use at.
- git remove branch
- git remove added file to commint
- how to check if pip is installed
- git pull hard
- ruby for loop
- ubuntu syslog.2.gz
- ansible only disable service if installed
- bash get value after equal sign
- Error while finding module specification for 'virtualenvwrapper.hook_loader' - ubuntu 20