Skip to content

Commit

Permalink
fix packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Unitech committed Apr 14, 2020
1 parent 9de4a26 commit 9f040d5
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
8 changes: 8 additions & 0 deletions examples/web/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/@pm2/js-api@0.5.63/dist/keymetrics.es5.min.js"></script>
<script src="./main.js"></script>
</head>
<body>
</body>
</html>
24 changes: 24 additions & 0 deletions examples/web/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@


var client = new window.Keymetrics()

client.use('browser', {
client_id: '4228578805'
})

client.user.retrieve()
.then((response) => {
console.log(response.data)
})


client.bucket.retrieveAll()
.then((res) => {
var bucket = res.data[0]

client.realtime.subscribe(bucket._id).catch(console.error)

client.realtime.on(`${bucket.public_id}:*:status`, (status) => {
console.log(status)
})
})
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
},
"homepage": "https://github.com/keymetrics/km.js#readme",
"dependencies": {
"async": "^3.2.0",
"async": "^2.6.3",
"axios": "^0.19.0",
"debug": "~4.1.1",
"eventemitter2": "^4.1.0",
"debug": "~3.2.6",
"eventemitter2": "^6.3.1",
"ws": "^7.0.0"
},
"devDependencies": {
Expand Down

0 comments on commit 9f040d5

Please sign in to comment.