这是一个支持
Vue
和Element
组件库在线运行的工具
可以利用本工具运行一些小demo, 无需搭环境, 将代码粘贴过来, 即可执行。支持Vue版本和Element版本的切换。
yarn install
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /usr/share/nginx/html;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name localhost;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
location ~ ^/vue/ {
proxy_pass https://cdn.bootcss.com;
}
location ~ ^/element-ui/ {
proxy_pass https://cdn.bootcss.com;
}
}
yarn run serve
yarn run build
docker build -t vue-run .
docker run -i -t -p 5000:80 vue-run
访问http://localhost:5000
就可以访问了