generated from Guerrero25/react-native-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b60d0b2
commit 9fdb3e9
Showing
2 changed files
with
22 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters