Manual Backend Configuration
When to use this guide: We recommend this fallback when you cannot use the Cloudflare tunnel workflow — for example, on Tiered or Microservice templates (which do not include
tunnel.js), when corporate firewalls blockcloudflared, or when developing fully offline.
Prefer simpler options first:
- Browser testing → Running on Web (no backend changes)
- Pro, non-tiered Monolith on emulator/device → Running on Device with
yarn tunnel:apior the MobileEmulator profile
React Native does not trust the auto-generated .NET HTTPS certificate. Use HTTP during this manual workflow.
To disable the HTTPS-only settings of OpenIddict, open the MyProjectNameHttpApiHostModule project and add the following code block to the PreConfigureServices method:
#if DEBUG
PreConfigure<OpenIddictServerBuilder>(options =>
{
options.UseAspNetCore()
.DisableTransportSecurityRequirement();
});
#endif
Important: Before running the backend application, make sure you have completed the database migration if you are starting with a fresh database.
A React Native application running on an Android emulator or a physical phone cannot connect to the backend on localhost. Bind the backend to 0.0.0.0 so it accepts requests from your local network, then update Environment.ts with your local IP address.
- Open the
appsettings.jsonfile in the.DbMigratorfolder. Replace thelocalhostaddress in theRootUrlproperty with your local IP address. Then, run the database migrator. - Open the
appsettings.Development.jsonfile in the.HttpApi.Hostfolder. Add this configuration to accept global requests for testing the React Native application in the development environment.{ "Kestrel": { "Endpoints": { "Http": { "Url": "http://0.0.0.0:44323" //replace with your host port } } } }
Update react-native/Environment.ts with your local IP address instead of localhost, then start Expo as described in Running on Device.
Run the backend application(s) as described in the getting started document.