Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fatelei/kidsjs
Node.js client for zhihu kids server.
https://github.com/fatelei/kidsjs
Last synced: about 1 month ago
JSON representation
Node.js client for zhihu kids server.
- Host: GitHub
- URL: https://github.com/fatelei/kidsjs
- Owner: fatelei
- Created: 2015-12-09T15:41:11.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-09T16:01:52.000Z (about 9 years ago)
- Last Synced: 2024-10-31T18:13:12.506Z (about 2 months ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [Kids](https://github.com/zhihu/kids) Node.js client.
![Build Status](https://travis-ci.org/fatelei/kidsjs.svg)
# Install
```
npm install kidsjs
```# APIs
# Logging
Logging class.
## enableKids
Setup logging handler.
**Parameters**
- `config` **object** Config
- port {number}: kids server port
- host {number}: kids server host
- topic {string}: kids topic**Usage**
```
const logging = require('kidsjs');
logging.enableKids({
port: 6379,
host: 'localhost',
topic: 'test
});
```## debug
Log debug level message.
**Parameters**
- `message` **string** Log content
**Usage**
```
logging.debug('hehe');
```## error
Log error level message.
**Parameters**
- `message` **string** Log content
**Usage**
**Usage**
```
logging.error('hehe');
```## info
Log info level message.
**Parameters**
- `message` **string** Log content
**Usage**
**Usage**
```
logging.info('hehe');
```## warn
Log warn level message.
**Parameters**
- `message` **string** Log content
**Usage**
```
logging.warn('hehe');
```