AnyWhere 靜態檔案伺服器

2022-07-02 02:09:07 字數 495 閱讀 5506

2020-11-27 16:47:43

anywhere是一款隨啟隨用的靜態檔案伺服器,可以隨時隨地將你的當前目錄變成乙個靜態檔案伺服器的根目錄。

npm install anywhere -g

$ anywhere

//or with port

$ anywhere -p 8000

//or start it but silent(don't open browser)

$ anywhere -s

//or with hostname

$ anywhere -h localhost -p 8888

//or with folder

$ anywhere -d ~/git/anywhere

//or enable html5 history

$ anywhere -f /index.html

最後,瀏覽器輸入:

隨啟隨用的靜態檔案伺服器Anywhere

1 搜尋anywhere 2 安裝 npm install anywhere g 必須之前安裝node環境保證npm命令可以使用。3 檢視用法 anywhere help anywhere 8000為預設埠,以當前資料夾為根路徑 anywhere 8888 以8888為埠 anywhere p 89...

Anywhere 隨啟隨用的靜態檔案伺服器

三江建材官網專案 寫nodejs系列的文章都是因為這乙個專案 第一天,搭建專案環境 記錄心情 首先,在寫這個專案的時候,我很無助,只是拿到了設計稿,還有乙個指導人,平常會很忙,只有在休閒的時候才能動筆去做這個專案。對於我本人而言,我能夠寫出這文字是因為這個難度對我而言還不是很大,而且剛剛掌握這個知識...

nodejs入門 靜態檔案伺服器

本文展示是基於node.js的靜態檔案伺服器,參考自這裡,主要是練習node http 檔案模組的使用,另外,對理解http協議也很有幫助 除了實現了基本的路由控制,還實現了mime型別 304快取 gzip壓縮 目錄讀取 首先是配置檔案,setting.js var setting compres...