聚合服务与python -m http.server

时间:2019-06-07 08:26:57

标签: python html polymer web-component

我正在关注this document

npm install -g polymer-cli
git clone https://github.com/PolymerLabs/start-polymer3.git
cd start-polymer3
npm install
polymer serve

这有效。但是,如果我运行python -m http.server而不是polymer serve,它将无法正常工作。

有什么区别?

聚合物投放 polymer serve

python -m http.server python -m http.server

1 个答案:

答案 0 :(得分:0)

这取决于您的python版本。使用Python -V签出,然后尝试;

# If Python version returned above is 3.X
python3 -m http.server
# On windows try "python" instead of "python3"
# If Python version returned above is 2.X
python -m SimpleHTTPServer