API Sharing
Share your local API with mobile developers, external testers, or clients without deploying to a server.
Use Cases
- Share a backend API with mobile app developers working remotely
- Demo an API to clients before deploying to production
- Allow QA testers to test against your local development build
- Collaborate with frontend developers who need access to your API
Step-by-Step Guide
1. Start your API server
Run your API locally. Example with a Node.js Express server:
// server.js
const express = require('express');
const app = express();
app.get('/api/users', (req, res) => {
res.json([{ id: 1, name: 'John' }, { id: 2, name: 'Jane' }]);
});
app.listen(3000, () => console.log('API running on port 3000'));
2. Expose with ExposeHost
python client_cli.py
Port to forward: 3000
Subdomain: my-api
3. Share the URL
Your API is now accessible at https://my-api.ExposeHost.me
Share this URL with your team. They can make requests like:
curl https://my-api.ExposeHost.me/api/users
Mobile App Development
For mobile developers, update the base URL in the app configuration:
// iOS/Android config
const API_BASE_URL = 'https://my-api.ExposeHost.me';
// Instead of
// const API_BASE_URL = 'http://localhost:3000';
Tips
- Use HTTPS URLs for mobile apps (required by iOS App Transport Security)
- Keep the tunnel running while others are testing
- Use a consistent subdomain to avoid updating URLs