"serve current directory from command line" Code Answer's
You're definitely familiar with the best coding language Shell/Bash that developers use to develop their projects and they get all their queries like "serve current directory from command line" answered properly. Developers are finding an appropriate answer about serve current directory from command line related to the Shell/Bash coding language. By visiting this online portal developers get answers concerning Shell/Bash codes question like serve current directory from command line. Enter your desired code related query in the search bar and get every piece of information about Shell/Bash code related question on serve current directory from command line.
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
Source: stackoverflow.com
All those coders who are working on the Shell/Bash based application and are stuck on serve current directory from command line can get a collection of related answers to their query. Programmers need to enter their query on serve current directory from command line related to Shell/Bash code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about serve current directory from command line for the programmers working on Shell/Bash code while coding their module. Coders are also allowed to rectify already present answers of serve current directory from command line while working on the Shell/Bash language code. Developers can add up suggestions if they deem fit any other answer relating to "serve current directory from command line". Visit this developer's friendly online web community, CodeProZone, and get your queries like serve current directory from command line resolved professionally and stay updated to the latest Shell/Bash updates.