Skip to content

Instantly share code, notes, and snippets.

@bakso
Created July 23, 2018 03:19
Show Gist options
  • Save bakso/03c43065b180b25746b04e53521d3ec6 to your computer and use it in GitHub Desktop.
Save bakso/03c43065b180b25746b04e53521d3ec6 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/luzewog
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://web-device.oss-cn-hangzhou.aliyuncs.com/aliyun-iot-device-sdk.min.js?00001"></script>
</head>
<body>
<script>
var device = aliyunIot.device({
productKey: 'a14Aw9G5fP4',
deviceName: 'uu2u6LDca6Sa9MjsiCYa',
deviceSecret: 'meB66DYCXjq8g13KBmwDVW2DAhxi3WyD',
tls: true,
});
device.on('connect', () => {
console.log('connect successfully!');
});
</script>
<script id="jsbin-source-javascript" type="text/javascript"> </script></body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment