Whis is UIKit?
Note:部署在Windows
系統會出現路徑錯誤狀況,這裏採用在Debian
系統上進行編譯和部署。node
Curl
、Git
、Node
、Yarn
、linux
# 更新倉庫 apt-get update # 安裝 curl apt-get install curl # 安裝 git apt-get install git # 安裝 node curl -sL https://deb.nodesource.com/setup_10.x | bash - apt-get install -y nodejs # 安裝 yarn curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list apt-get update && apt-get install yarn
mkdir /home/localhost cd /home/localhost git clone https://github.com/uikit/uikit-site.git
cd uikit-site yarn install yarn setup
使用 golang
語言進行部署git
源文件 main.go
github
package main import ( "fmt" "net/http" ) func main() { fmt.Println("Zeros") http.Handle("/", http.FileServer(http.Dir("/home/localhost/uikit-site/"))) http.ListenAndServe(":10086", nil) }
使用 瀏覽器訪問 http://127.0.0.1:10086 便可.golang
Node:在 linux 部署時注意賦予文件足夠權限。windows
這裏我是把編譯完的文件複製到 windows 進行部署的,須要複製 uikit-site/node_modules/uikit/dist
文件夾至 uikit-site/assets/uikit
目錄。使用 linux 不須要該操做
瀏覽器