Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/onesy-me/redis
Redis utils
https://github.com/onesy-me/redis
amaui api back-end backend js nodejs redis utils
Last synced: 10 days ago
JSON representation
Redis utils
- Host: GitHub
- URL: https://github.com/onesy-me/redis
- Owner: onesy-me
- License: mit
- Created: 2024-01-21T11:22:53.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-12-11T20:30:27.000Z (23 days ago)
- Last Synced: 2024-12-11T20:36:34.216Z (23 days ago)
- Topics: amaui, api, back-end, backend, js, nodejs, redis, utils
- Language: JavaScript
- Homepage: https://docs.onesy.me/library/redis
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
onesy Redis
Redis
MIT license
Production ready
100% test cov
Nodejs
Very simple code
Modern code
Junior friendly
Typescript
Made with :yellow_heart:
## Getting started
### Add
```sh
yarn add @onesy/redis
```Add `redis` peer dependency.
```sh
yarn add redis
```### Use
```javascript
import OnesyRedis from '@onesy/redis';
// Make if you wanna a config file and
// inside of it add all the process.env related props
import Config from './config';// Make a new amqp instance
const onesyRedis = new OnesyRedis({
uri: Config.amqp.redis.uri
});// Await for a client connection
await onesyRedis.client;// Send to a queue
await onesyRedis.publish('a', 'a');
```### Dev
Install
```sh
yarn
```Test
```sh
yarn test
```One time local setup
Install docker and docker-compose
- https://docs.docker.com/get-docker
- https://docs.docker.com/compose/installMake docker containers
```sh
yarn docker
```### Prod
Build
```sh
yarn build
```