Skip to content
Howard edited this page Jul 23, 2017 · 1 revision

启动HTTP服务器,浏览叮当临时目录,可用于查看微信二维码(文件名:wxqr.png)。

交互示例

  • 用户:启动服务器
  • 叮当:正在启动服务器
  • 叮当:后台服务器启动成功,服务端口 8080

通过浏览器打开 http://[树莓派IP]:8080/ 可以查看到叮当临时目录的文件列表。

配置

可自定义服务器端口,端口号小于1024需root用户执行。

# WEB服务器
webserver:
    webport: 8080

优化操作

可以在临时目录中放置主页文件index.html快速查看微信二维码

index.html 文件示例

<!DOCTYPE html>
<html>
<head>
  <title>Raspberry Pi</title>
</head>
<body>
  <img id='qrcode' style="width:100%" src='./wxqr.png' />
</body>
</html>