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 不须要该操做
浏览器