Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请教ss.coffee怎么用? #7

Open
javacty opened this issue Dec 18, 2015 · 2 comments
Open

请教ss.coffee怎么用? #7

javacty opened this issue Dec 18, 2015 · 2 comments

Comments

@javacty
Copy link

javacty commented Dec 18, 2015

我安装了node和npm、coffee-script,把ss.coffee编译成ss.js, 然后运行了,node ss.js。
然后怎么用呢?

@Lupino
Copy link
Owner

Lupino commented Dec 18, 2015

ss.coffee 提供一个操作 server 数据库(redis) 的例子,你可以使用任何语言去操作。

使用:

// install requirement
// npm install redis
var ss = require('ss');
// create a new user.
var user = {
  name: 'name',
  password: 'password',
  method: 'aes-128-cfb',
  limit: 1  1024  1024  1024
};

ss.set_user(user, function() {
   console.log('create user done');
});

剩下的自己看代码吧, 有详细的注释

@javacty
Copy link
Author

javacty commented Dec 19, 2015

哦,这样,没想到作者回复的这么快,太感谢了!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants