Skip to content

appspanel/sdk-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NodeJS SDK for AppsPanel Mobile Backend (APNL)

Use this sdk to :

  • Make API calls to your specific API (API Platform)
  • Interact with standard AppsPanel modules (User/Auth, File & Content Management) -- coming soon
  • Send specific KPI (Analytics) -- coming soon

Getting Started

1 - Install

NodeJS-SDK will work on most systems out-of-the-box with nodejs and native API (no dependencies required).

npm install apnl

2 - Configuration

Build ap-config.json :

{
    "appname": "YOURAPPNAME",
    "appkey": "YOURAPPKEY",
    "log_level": 1
}
  • appname : this is your appname (you get it when you create an app on backend.appspanel.com)
  • appkey : this is your appkey (you get it when you create an app on backend.appspanel.com)
  • log_level :
  • 0 : no log
  • 1 : error => what you want in production
  • 2 : error & info => what you want in development
  • 3 : error, info & debug

3 - Include & Run

var apnl = require('apnl')();

if configuration is named "ap-config.json" and exists in the current directory.

or

var apnl = require('apnl')('../ap-config.json');

depending on where your config is located and how it is named.

Make your first call :

var apnl = require('apnl')();

//very simple GET request on /test with get parameters foo (value FOO), and callback success and error provided
apnl.request("test?foo=FOO", null, function (data) {
    //success
    console.log("callback success");
    console.log(data);
}, function (error) {
    //error
    console.log("callback error");
    console.log(error);
});

Get more examples here

Have a problem ?

Feel free to contact us on : support@apps-panel.com

Resources

About

NodeJS SDK for using AppsPanel Mobile Backend (APNL)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published