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许可证获得许可 - 有关详细信息,请参见许可证文件。