Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shimondoodkin/salesforce-soql-query-tool
http://salesforce-jsforce-proxy.herokuapp.com/
https://github.com/shimondoodkin/salesforce-soql-query-tool
Last synced: about 1 month ago
JSON representation
http://salesforce-jsforce-proxy.herokuapp.com/
- Host: GitHub
- URL: https://github.com/shimondoodkin/salesforce-soql-query-tool
- Owner: shimondoodkin
- License: mit
- Created: 2014-10-17T20:38:26.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-22T21:09:35.000Z (about 10 years ago)
- Last Synced: 2024-10-19T23:04:20.395Z (3 months ago)
- Language: JavaScript
- Size: 2.85 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JSforce AJAX Proxy
A proxy server to access Salesforce API from JSforce JavaScript apps served outside of Salesforce.
As the same origin policy restricts communication to the Salesforce API from outer domain,
you should serve cross-domain proxy server when you build a app using JSforce outside of Salesforce.This app will become obsolete immediately when Salesforce API supports CORS.
I hope the day will come soon.## Usage
Start proxy server in your server environment which can run Node.js app (Heroku is the one you might choose).
Install required packages :
```
$ npm install
```Run proxy server :
```
$ node proxy.js
```When you use JSforce in your JavaScript app, set `proxyUrl` when creating `Connection` instance.
```
var conn = jsforce.Connection({
accessToken: '',
instanceUrl: '',
proxyUrl: 'https://your-ajax-proxy-service.herokuapp.com/proxy/'
});conn.query('SELECT Id, Name FROM Account', function(err, res) {
// ...
});
```## Note
You don't have to use this app when you are building a JSforce app in Visualforce,
because it works in the same domain as Salesforce API.