← Back to Docs

API Sharing

Share your local API with mobile developers, external testers, or clients without deploying to a server.

Use Cases

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