1.0.0 • Published 6 years ago

@gggdomi/same-domain-different-port v1.0.0

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

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...)