1.0.2 • Published 1 year ago

salesforce-proxy v1.0.2

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Salesforce Proxy

This is a dev tool that provides an authenticated proxy to Salesforce server using a cookie.

The tool can be either installed globally or run directly.

The salesforce url defaults to https://resco.crm4.salesforce.com/ and can be changed with --url command line argument.

The proxy listens, by default, at http://localhost:6001. The port can be changed using --port command line argument.

Quick Start

To install globally

npm install -g salesforce-proxy

Then, run with

salesforce-proxy

To run without installing globally

npx salesforce-proxy

Command line arguments

--url https://custom.url changes the salesforce url to proxy

--port 3000 changes the port at which the proxy listens

Building and Contributing

This tool is built using nx.dev tools.

To build, run

nx build salesforce-proxy

The output is in dist/packages/salesforce-proxy. From there, the library can be published.

About implementation

The tool uses Electron to open up the Salesforce app so that the user can log in. After login, the cookie is aquired and used in proxy. For proxy, Express server is used with express-http-proxy middleware.