weather vue
1.0.0
使用Vue.js,Google Maps Geocoding和Dark Sky的天氣應用程序。
# clone repo and API submodule
git clone https://github.com/krestaino/weather-vue.git --recursive
# to fetch submodule if already cloned without the `--recursive` flag
git submodule update --init該項目的API後端是使用節點和Express的REST API。它包含在該項目中,作為子模塊,位於./api中。存儲庫可以在這裡找到。此後端API從Google獲取地理位置數據和Dark Sky的天氣數據,並將其返回到Weather Vue應用程序。
重命名./api/keys.js.example為./api/keys.js ,並添加您的Dark Sky API和Google GeoCoding API鍵。
重命名./keys.js.example example為./keys.js ,並添加您的Google Maps JavaScript API鍵。此API鍵用於使用Google Maps JavaScript API的背景圖。 prod密鑰在您的前端代碼中暴露,因此請確保將HTTP推薦人限制為僅允許您的生產URL請求。這可以在Google API控制台中完成。 dev密鑰不包含在生產代碼中,因此不需要相同的限制。
# install dependencies
npm install
# serve with hot reload at localhost:8080 and API at localhost:3000
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report有關工作方式的詳細說明,請查看VUE.JS WebPack指南和Vue-Loader的文檔。
該項目已根據MIT許可證獲得許可 - 有關詳細信息,請參見許可證文件。