Skip to content

Commit

Permalink
docs: Version 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Guerrero25 committed Feb 21, 2020
1 parent b60d0b2 commit 9fdb3e9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
35 changes: 20 additions & 15 deletions README.md
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`
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 9fdb3e9

Please sign in to comment.