Skip to content

TheCandyMan-apps/yieldpilot-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YieldPilot Proxy (Vercel)

A tiny server that safely proxies your Rocket app to real data sources (e.g., Apify) without exposing tokens.

1) Deploy (5 minutes)

npm i -g vercel
vercel login
vercel

You’ll get a URL like: https://yieldpilot-proxy.vercel.app

2) Environment Variables (Vercel → Project Settings → Environment Variables)

  • ALLOWED_ORIGINS = https://yieldpilot.co.uk,https://yieldpilot.app,http://localhost:5173
  • DATA_MODE = mock (switch to apify when ready)
  • APIFY_TOKEN = your-apify-token (only needed for apify mode)
  • APIFY_ACTOR_URL = your Apify actor/wrapper endpoint

3) Endpoints

  • GET /api/search?q=Manchester&page=1&pageSize=24&market=UK Returns { total, page, pageSize, results[] }

  • GET /api/properties/:id Returns a detailed object with charts, comps, risk, etc.

4) Wire to Rocket

In the Rocket app, set:

  • VITE_API_BASE = https://YOUR-VERCEL-URL

Example fetch:

const API_BASE = import.meta.env.VITE_API_BASE;
const res = await fetch(`${API_BASE}/api/search?q=Manchester&page=1&pageSize=24`);
const data = await res.json();

5) Switch to Apify

  • Set DATA_MODE=apify
  • Provide APIFY_TOKEN and APIFY_ACTOR_URL
  • Adapt the mapping in api/search.js to your actor’s fields

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors