@gggdomi/same-domain-different-port
v1.0.0
Published
Front-end server running on port 3000, back-end server on port 5000.
Downloads
1
Readme
Helper function created for personal use.
Use-case
Front-end server running on port 3000, back-end server on port 5000.
import 'sddp' from '@gggdomi/same-domain-different-port'
const BACKEND_URL = sddp(5000)
API call will reach the corresponding server, no matter which device and url is used to access the front-end (be it localhost, LAN ip, domain name...)