A simple app to check the weather built with React Native.
- React Native 0.61.5
- React 16.9.0
- React Navigation 3.11.0
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.
WEATHER_API_BASE_URL=
GOOGLE_PLACES_API_KEY=
GOOGLE_PLACES_API_BASE_URL=https://maps.googleapis.com/maps/api/place
DEFAULT_LAYOUT_BACKGROUND=
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 an example of the weather service.
The GOOGLE_PLACES_API_KEY
is the key what all requests to the Google Place API have to have. You can get your API key here
The DEFAULT_LAYOUT_BACKGROUND
is the URL for the background image that appears when there is no valid image from the weather web service.
- Clone repository.
git clone https://github.com/Guerrero25/native-weather
- Install dependencies
npm install
- Run the project
react-native run-android
orreact-native run-ios