Tag Archives: javascript api

SFS2X and Node.js

Some time ago we have been asked by the developers at Gameshastra how to integrate our SFS2X JavaScript client API in Node.js, in order to create a Node application capable of interacting with SmartFoxServer 2X.

We have a strategy game for which we built native client apps in Android, iOS and HTML5. We are also exposing the client functionality as a rest api for apps to be built for Amazon Alexa and Google Assistant. That rest api is being built on Node.js and we want to consume the same services hosted on SFS2X, so that we can manage all the platforms from the same server base and provide unified experience.

Continue reading

New JavaScript API v1.7.10 released

We just released v1.7.10 of the SFS2X JavaScript client API.

Starting from this new version, we completely reviewed the build process of the API.
This fixes some compatibility issues of the internal third-party libraries with module bundlers (like webpack) and also brings:

  • reduced API file size (-41%)
  • a source map to help debug the API, should unexpected issues show up in the future
  • the official SFS2X API package for the npm package builder
  • Node.js compatibility

As always, the new package is available on the download page of our website (other than in the npm repository, from now on).

In order to showcase the usage of the API with npm and webpack, we also released a variant Connector example describing the project setup and build process, including the new source mapping option.

Enjoy!