Pub 服務

此命令為 Dart Web 應用程式啟動開發伺服器或開發伺服器。開發伺服器是 localhost 上的 HTTP 伺服器,用於提供 Web 應用程式的資產

從包含你的 Web 應用程式的 pubspec.yaml 檔案的目錄啟動 dev 伺服器:

$ cd ~/dart/helloworld
$ pub serve
Serving helloworld on http://localhost:8080