Skip to content

Instantly share code, notes, and snippets.

@vseventer
Created May 24, 2012 14:25
Show Gist options
  • Save vseventer/2781874 to your computer and use it in GitHub Desktop.
Save vseventer/2781874 to your computer and use it in GitHub Desktop.
Minimal setup to use the Kinvey JavaScript Library.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Hello World</title>
</head>
<body>
<h1>Hello World</h1>
<script async src="//da189i1jfloii.cloudfront.net/js/kinvey-js-0.9.1.min.js"></script>
<script>
window.onload = function() {
Kinvey.init({
appKey: '<your-app-key>',
appSecret: '<your-app-secret>'
});
// Now, you have access to all of Kinvey's features.
// See https://console.kinvey.com/#docs/JavaScript/JS-Developers-Guide for detailed information.
// For example, we could ping the Kinvey service:
Kinvey.ping({
success: function(response) {
alert('Success: ' + response.kinvey);
},
error: function(error) {
alert('Error: ' + error.error);
}
});
};
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment