
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
force-server
Advanced tools
ForceServer is a simple development server aimed at providing a simple and integrated developer experience when building applications that use Salesforce OAuth and REST services. ForceServer provides two main features:
Open a command prompt and type:
npm install -g force-server
or (Unix-based systems)
sudo npm install -g force-server
Create a file named index.html anywhere on you file system:
<html>
<body>
<ul id="list"></ul>
<script src="http://ccoenraets.github.io/forcejs/force.js"></script>
<script>
force.login(function() {
force.query('select id, Name from contact LIMIT 50', function (response) {
var str = '';
for (var i = 0; i < response.records.length; i++) {
str += '<li>' + response.records[i].Name + '</li>';
}
document.getElementById('list').innerHTML = str;
});
});
</script>
</body>
</html>
Code Highlights:
Navigate to the directory where you created index.html, and type:
force-server
This command will start the server on port 8200, and automatically load your app (http://localhost:8200) in a browser window. You'll see the Salesforce login window, and the list of contacts will appear after you log in.
You can change the port number and the web root. Type the following command for more info:
force-server --help
To uninstall the CLI:
npm -g rm force-server
or
sudo npm -g rm force-server
ForceServer is CORS-enabled. Instead of running it locally as a development server, you can deploy it to Heroku as your Proxy Server. Click the button below to deploy ForceServer to Heroku:
To use the Proxy Server deployed to Heroku, call the force.init() function before force.login() and specify your Proxy URL. For example, if the Heroku app you just created is myproxy:
force.init({
proxyURL: 'https://myproxy.herokuapp.com'
});
FAQs
Development server for Force.com
The npm package force-server receives a total of 11 weekly downloads. As such, force-server popularity was classified as not popular.
We found that force-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.