2 个版本
0.1.1 | 2022 年 10 月 6 日 |
---|---|
0.1.0 | 2022 年 9 月 11 日 |
#12 in #localhost
20KB
303 行
非常简单的方式从目录中提供本地 web 服务器。
用于开发。请勿用于生产。
# Start default port at current dir: https://127.0.0.1:8080 at the current folder
webdev
# Starts with custom port: https://127.0.0.1:8888
webdev -p 8888
# The root directory to be served (and watched by default)
webdev -d /some/dir
# Overriding the watch paths
webdev -d /some/dir -w /some/dir/dist/js/app-bundle.js -w /some/dir/dist/css
# Start with live mode
# Will add `<script src="/_webdev_live.js"></script>` at the end of all html file)
# A web-socket server is always on at /_webdev_live_ws (which send events when root dir file changes)
webdev -l
依赖项
~10–22MB
~300K SLoC