From 1b4149522211ced35fd24edad7485412355b152b Mon Sep 17 00:00:00 2001 From: Alexis DRAI Date: Fri, 16 Jun 2023 11:47:33 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Connect=20this=20app=20to=20the?= =?UTF-8?q?=20API=20while=20running=20on=20Android?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 19 +++++++++++++------ config.ts | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 43d6acd..ccd6ef1 100644 --- a/README.md +++ b/README.md @@ -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. - + ### Collection The collection screen displays a list of `Moves` fetched from the API. - +> ### Detail The detail screen displays detailed information about a selected `Move`. - +> ### Creating The creating screen provides a form for creating a new `Move`. - +> ### Updating The updating screen provides a form for updating an existing `Move`. - +> ## 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 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 -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 npx expo start diff --git a/config.ts b/config.ts index 3b99d72..b7ae1ac 100644 --- a/config.ts +++ b/config.ts @@ -1,2 +1,2 @@ // config.ts -export const API_BASE_URL = 'http://localhost:8080'; +export const API_BASE_URL = 'http://192.168.0.15:8080';