The following command can be run from a Mac to allow service to run a simple Web server to allow connectivity to access the files located on /path/to/parcels. Very useful for spinning up a quick CM/CDH repro cluster and needing to post a repo to host CM/CDH/Other parcels.
$ cd /path/to/parcels; ifconfig | grep inet; sudo python -m SimpleHTTPServer 80
(Originally sourced from: http://lifehacker.com/start-a-simple-web-server-from-any-directory-on-your-ma-496425450, modified to fit this use-case)
The breakdown of the above command:
1) Change dir to the specified location to share/make available
2) Report all of the available network interfaces and display their IP address
3) Run the python package for SimpleHTTPServer on port 80.
No comments:
Post a Comment