From 9fdb3e9cc89e2abd087fa0fb7e19c2e23db98451 Mon Sep 17 00:00:00 2001 From: Omar Guerrero Date: Fri, 21 Feb 2020 23:10:17 +0100 Subject: [PATCH] docs: Version 1.0.1 --- README.md | 35 ++++++++++++++++++++--------------- package.json | 4 ++-- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 1e7d4ef..bf8eae3 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,38 @@ -# React Native's Project Template +# Weather app with React Native -A basic boilerplate to create a react-native project with, +#### Dependencies -* [TypeScript](https://www.typescriptlang.org/docs/home.html) +* React Native 0.61.5 +* React 16.9.0 +* React Navigation 3.11.0 -* [Native Base](https://docs.nativebase.io/) +#### Setup -* [React Navigation](https://reactnavigation.org/docs/en/getting-started.html) +Before you can run the application is necessary to create a `.env` file in the root of the application. This file has the environment variables that are important for the app. -## How to start + WEATHER_API_BASE_URL= + GOOGLE_PLACES_API_KEY= + GOOGLE_PLACES_API_BASE_URL=https://maps.googleapis.com/maps/api/place -1. Clone repository. + DEFAULT_LAYOUT_BACKGROUND= -- `git clone https://github.com/Guerrero25/react-native-project-template.git` -2. Delete android and ios folder. +The `WEATHER_API_BASE_URL` variable is the base URL to the weather service. It could be your own service but it has to have a route `/weather` where the app is requesting for the weather data. [Here](https://github.com/srLitem/node-weather-webApp) an example of the weather service. -- `rm -R ./android && rm -R ./ios` +The `GOOGLE_PLACES_API_KEY` is the key what all requests to the [Google Place API](https://developers.google.com/places/web-service/intro?utm_source=google&utm_medium=cpc&utm_campaign=FY18-Q2-global-demandgen-paidsearchonnetworkhouseads-cs-maps_contactsal_saf&utm_content=text-ad-none-none-DEV_c-CRE_417765871429-ADGP_Hybrid+%7C+AW+SEM+%7C+SKWS+~+Places+%7C+BMM+%7C+Places+API-KWID_43700051585816020-aud-669510846654:kwd-475997044718-userloc_9065312&utm_term=KW_%2Bplace%20%2Bapi-ST_%2Bplace+%2Bapi&gclid=Cj0KCQiAnL7yBRD3ARIsAJp_oLYFYfnxedMTZnmg3M-FzfTRgt7lM0ctBiG5M4dMOD_lvfb5ocI7a1caAlF-EALw_wcB) have to have. You can get your API key [here](https://developers.google.com/places/web-service/get-api-key) -3. Change the app name on `app.json`. +The `DEFAULT_LAYOUT_BACKGROUND` is the URL for the background image that appears when there is no valid image from the weather web service. -4. Run react-native eject command and link the dependencies +## How to start + +1. Clone repository. -- `react-native eject && react-native link` +- `git clone https://github.com/Guerrero25/native-weather` -5. Install dependencies +2. Install dependencies - `npm install` -6. Run the project +3. Run the project - `react-native run-android` or `react-native run-ios` diff --git a/package.json b/package.json index bfaa85b..27a7780 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "ReactNativeTemplateProject", - "version": "0.0.1", + "name": "native-weather", + "version": "1.0.1", "private": true, "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start",