mac 上運行httpserver的問題

若是你的系統是window 我建議你安裝http-server 很是好用,python

若是是mac,系統自帶的就有httpserver 服務,沒有必要在安裝apache

按照我說的來操做url

首先 code

sudo apachectl start  

而後 ,ls執行查看下目錄,cd到你要的文件夾內執行以下代碼:server

python -m SimpleHTTPServer 

而後在地址欄鍵入以下url 便可打開,是否是很好用。blog

http://localhost:8000class

相關文章
相關標籤/搜索