JavaScript SDK provides core functionality for building web and mobile applications on [Baasic](http://www.baasic.com/).
npm install baasic-sdk-javascripthtml
`
Note: Baasic JavaScript SDK depends on reflect-metadata package, in order to use the sdk directly and not as a part of another JavaScript framework reflect-metadata should be manually imported into the project. Other Baasic SDKs or frameworks may handle this dependency automatically. jQuery dependency should be used only if sdk is used separately from other JavaScript frameworks, if sdk is used as a part of some framework (e.g. Angular) then sdk for that specific framework should be used and jQuery is not needed as a dependency.
$3
To create the _BaasicApp_ you will need to use the _baasicSdkJavaScript_ object on the global scope.
`javascript
//Note: this is configuration example only, these are the defaults
var options = {
apiRootUrl: 'api.baasic.com',
apiVersion: '',
enableHALJSON: false
};
var application = new baasicSdkJavaScript.BaasicApp('', options);
`
$3
`javascript
application.membershipModule.login.login({
username: '',
password: ''
}).then(function (data) {
//Do your work here
}, function (data) {
console.log(data);
});
`
Baasic Modules
Baasic back-end contains various built-in modules that can be easily consumed through the Baasic JavaScript library. Baasic Developer Center contains detailed information about all the core modules supported by the JavaScript library.
Build Process
1. Install NodeJs
2. Open Shell/Command Prompt in the Baasic JavaScript folder
3. Run npm install`