SCLAB client side javascript NPM Module for integrate with a SITE created by SCLAB Studio
npm install sclabjs
import { Sclab } from 'sclabjs';
// client side
Sclab.init("https://userSiteCode.sclab.io", ()=>{
// ready
// login
Sclab.login('[email protected]', '1234', (result: boolean)=>{
if(result){
// move to user page
}else{
// login error
}
});
});
Type: string
Published site url of your SITE.
Type: function
callback function when sclabjs ready to use
Type: string
email address
Type: string
user password
Type: function
callback function when login complete
Type: string
loginToken from REST API
Type: function
callback function when login complete
Type: function
callback function when logout complete
clear Sclab