pushert
v1.1.1
Published
Pushert is a Command Line Interface (CLI) application for testing Pusher methods. With Pushert, you can easily configure Pusher credentials, publish messages to Pusher channels, and subscribe to events on Pusher channels.
Downloads
31
Maintainers
Keywords
Readme
Pushert
Pushert is a Command Line Interface (CLI) application for testing Pusher methods. With Pushert, you can easily configure Pusher credentials, publish messages to Pusher channels, and subscribe to events on Pusher channels.
Installation
npm install --global pushert
or
npm i -g pushert
Using Yarn
yarn global add pushert
Configuration
The Pusher CLI stores your Pusher credentials in a configuration file named .pusher-config.json
.
On Unix
/home/{username}/.config/.pushert-config.json
On Window
C:\Users\{username}\.pushert-config.json
Configuration file contains the following:
{
"appId": string,
"key": string,
"secret" : string,
"cluster": string
"tls": boolean,
}
Before using the Pushert, you need to configure your Pusher credentials by running the following command:
pushert config
Follow the prompts to enter your Pusher API Key, API Secret and other options.
or
You can manually edit the file using Text editor.
Usage
Publishing a Message
To publish a message to a Pusher channel and event, use the publish command:
pushert publish <channel> <event> <message>
| Paramater | Description |
| ------------- |-------------|
| <channel>
| The name of the Pusher channel. |
| <message>
| The message you want to send. It should be a valid JSON object. |
| <event>
| The name of the event to trigger. |
Example
pushert publish my-channel my-event 'Hello, Pusher!'
or
pushert publish my-channel my-event '{"message": "Hello, Pusher!"}'
Subscribing to an Event
To subscribe to a Pusher channel and event, use the subscribe command:
pushert subscribe <channel> <event>
| Paramater | Description |
| ------------- |-------------|
| <channel>
| The name of the Pusher channel. |
| <event>
| The name of the event you want to subscribe to. |
Example
pushert subscribe my-channel my-event
Uninstallation
npm uninstall -g pushert
or
npm remove -g pushert
Using Yarn
yarn global remove pushert
Acknowledgments
- Pusher for their real-time messaging platform.
- Commander for the command-line interface framework.
- dotenv for managing environment variables.
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
Author
Contact
For any inquiries, please contact me via [email protected]
Connect with me
Social Networks
Facebook, tiktok, youtube, instagram as "feisalramar"
Skype
Playstation Network and Twitch
fxl_pro