🤖 Connect this app to the API while running on Android

pull/21/head
Alexis Drai 2 years ago
parent cc86eb36c9
commit 1b41495222

@ -60,31 +60,31 @@ This app will contain a home page, and a "master/detail" tab for `Moves` with ba
The home screen provides a logo, and tab navigation options to other parts of the application. The home screen provides a logo, and tab navigation options to other parts of the application.
<img src="./docs/home.png" width="410" style="margin:20px"> <img src="./docs/home.png" width="410" style="margin:20px" alt="">
### Collection ### Collection
The collection screen displays a list of `Moves` fetched from the API. The collection screen displays a list of `Moves` fetched from the API.
<img src="./docs/moves.png" width="410" style="margin:20px"> <img src="./docs/moves.png" width="410" style="margin:20px" alt="">>
### Detail ### Detail
The detail screen displays detailed information about a selected `Move`. The detail screen displays detailed information about a selected `Move`.
<img src="./docs/move.png" width="410" style="margin:20px"> <img src="./docs/move.png" width="410" style="margin:20px" alt="">>
### Creating ### Creating
The creating screen provides a form for creating a new `Move`. The creating screen provides a form for creating a new `Move`.
<img src="./docs/create.png" width="410" style="margin:20px"> <img src="./docs/create.png" width="410" style="margin:20px" alt="">>
### Updating ### Updating
The updating screen provides a form for updating an existing `Move`. The updating screen provides a form for updating an existing `Move`.
<img src="./docs/update.png" width="410" style="margin:20px"> <img src="./docs/update.png" width="410" style="margin:20px" alt="">>
## Using the app ## Using the app
@ -94,9 +94,16 @@ In order to use this app, you will need to run the dedicated backend. A `README`
with [instructions](https://github.com/draialexis/pokemong_api#user-content-prep-steps) is provided with [instructions](https://github.com/draialexis/pokemong_api#user-content-prep-steps) is provided
for that purpose. for that purpose.
### Connecting to the backend locally
First, please find the `config.ts` file at the root of this project, and replace ~~`192.168.0.15`~~
with the IPv4 address associated with your own Wi-Fi adapter.
To find that address out, you can run `ipconfig` on Windows or `ifconfig` on macOS/Linux in your terminal.
### Running this app ### Running this app
With the [Expo CLI](https://docs.expo.dev/more/expo-cli/) installed, at the root of the project, simply run Then, with the [Expo CLI](https://docs.expo.dev/more/expo-cli/) installed, at the root of the project, simply run
```bash ```bash
npx expo start npx expo start

@ -1,2 +1,2 @@
// config.ts // config.ts
export const API_BASE_URL = 'http://localhost:8080'; export const API_BASE_URL = 'http://192.168.0.15:8080';

Loading…
Cancel
Save