mirror of
https://github.com/qishibo/AnotherRedisDesktopManager.git
synced 2026-01-18 16:12:43 +00:00
u
This commit is contained in:
parent
bdd733774b
commit
7afcda574f
41
index.html
41
index.html
@ -19,18 +19,8 @@
|
||||
|
||||
<button id="sub-btn">submit</button>
|
||||
</body>
|
||||
<!-- <script type="text/javascript" src="index.js"></script> -->
|
||||
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
// alert(999)
|
||||
// $(function () {
|
||||
// alert('innnn');
|
||||
|
||||
// $('#sub-btn').click(function () {
|
||||
// alert(111)
|
||||
// })
|
||||
// })
|
||||
|
||||
|
||||
|
||||
|
||||
@ -49,11 +39,15 @@
|
||||
// });
|
||||
// return;
|
||||
|
||||
this.redis[operation](key, callback);
|
||||
|
||||
this.redis[operation + 'Async'](key).then(callback);
|
||||
},
|
||||
|
||||
getRedis: function(host, port, auth) {
|
||||
var redis = require("redis");
|
||||
const redis = require('redis');
|
||||
const bluebird = require('bluebird');
|
||||
|
||||
bluebird.promisifyAll(redis);
|
||||
var client = redis.createClient(port, host);
|
||||
|
||||
client.on("error", function (err) {
|
||||
@ -71,35 +65,16 @@
|
||||
var key = $('#key').val();
|
||||
var operation = $('#operation').val();
|
||||
|
||||
that.exec(operation, key, '', (err, reply) => {
|
||||
that.exec(operation, key, '', (reply) => {
|
||||
$('#result').val(reply);
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
qii404.init();
|
||||
|
||||
|
||||
// function getData(key)
|
||||
// {
|
||||
// var redis = require("redis"),
|
||||
// client = redis.createClient(6379, '10.20.1.133');
|
||||
|
||||
// client.on("error", function (err) {
|
||||
// return err;
|
||||
// });
|
||||
|
||||
|
||||
// client.get(key, function(err, reply) {
|
||||
// // reply is null when the key is missing
|
||||
// document.getElementById('value').value = reply;
|
||||
// });
|
||||
|
||||
// // client.quit();
|
||||
// }
|
||||
|
||||
// getData('name');
|
||||
|
||||
</script>
|
||||
</html>
|
||||
|
||||
46
package.json
46
package.json
@ -1,22 +1,28 @@
|
||||
{
|
||||
"name":"node_redis",
|
||||
"main":"index.html",
|
||||
"window":{
|
||||
"id": "noderedsi",
|
||||
"title":"noderedis",
|
||||
"toolbar":true,
|
||||
"frame":true,
|
||||
"position":"center",
|
||||
"always-on-top":true,
|
||||
"width":1100,
|
||||
"height":728,
|
||||
"icon": "/home/qii/MinimalistNote/64.ico",
|
||||
"as_desktop": true,
|
||||
"show_in_taskbar": true
|
||||
},
|
||||
"domain": "nodejsapp",
|
||||
"version": "1.0",
|
||||
"dependencies": {},
|
||||
"nodejs": true,
|
||||
"bg-script": "bg.js"
|
||||
"name": "node_redis",
|
||||
"main": "index.html",
|
||||
"window": {
|
||||
"id": "noderedsi",
|
||||
"title": "noderedis",
|
||||
"toolbar": false,
|
||||
"frame": true,
|
||||
"position": "center",
|
||||
"always-on-top": true,
|
||||
"width": 1100,
|
||||
"height": 728,
|
||||
"icon": "/home/qii/MinimalistNote/64.ico",
|
||||
"as_desktop": true,
|
||||
"show_in_taskbar": true
|
||||
},
|
||||
"domain": "nodejsapp",
|
||||
"version": "1.0",
|
||||
"nodejs": true,
|
||||
"bg-script": "bg.js",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "qii404",
|
||||
"email": "qii404@126.com",
|
||||
"web": "https://qii404.me"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user