Skip to content

Latest commit

 

History

History
44 lines (26 loc) · 1.34 KB

localApi.md

File metadata and controls

44 lines (26 loc) · 1.34 KB

Develop with a local API

Backend

To launch the backend, follow the instructions in backend.

In short, if you already set up the repo before:

  • get Docker running
  • run pc start-backend (or restart it if needed)
  • run pc sandbox -n industrial to populate the database

✅ Check: you can access your local swagger

Now back to the frontend.

Frontend

Change the variable API_BASE_URL to http://localhost in .env.testing

Webapp

To launch the web application, run yarn start:web:testing.

Mobile app

To make the mobile app request the backend, you either need to rebuild the application, OR you can change this line:

+   basePath: 'http://localhost',
-   basePath: env.API_BASE_URL,

Make sure your are logged out before changing that. Indeed, the user ids will differ between your backend and the database of testing.

Limitations

Since the backend differs between local / testing, you won't:

  • have the pictures of the offers.
  • be able to access the detail of an offer (wrong id)
  • hence book an offer, or favorite it.

However you can still access the app and should be able to workaround those limitations.