Skip to content

Instantly share code, notes, and snippets.

View aa2kb's full-sized avatar
Serverless

Amin Ahmed Khan aa2kb

Serverless
View GitHub Profile
@beradrian
beradrian / proxy.js
Created January 18, 2018 18:11
CORS proxy with node-http-proxy
/** If you want to use the local development environment with the dev backend,
* this will create a proxy so you won't run into CORS issues.
* It accepts the following command line parameters:
* - port the port where the proxy will listen
* - target the DEV backend target to contact.
* Example: If you set the port to 3000 and target to https://dev.nibo.ai then
* your actual "resourceBaseUrl" in NiboSettings should be http://localhost:3000/api/v1
*/
// Define the command line options
const optionDefinitions = [