1.0.8 • Published 3 years ago

@bsgbryan/jyn v1.0.8

Weekly downloads
8
License
MIT
Repository
github
Last release
3 years ago

NPM GitHub top language Travis (.com) branch Snyk Vulnerabilities for GitHub Repo GitHub last commit (branch)

Jyn

A simple, fun, fully asynchronous web socket server

Install

npm install -g @bsgbryan/jyn

Usage

jyn

That's it. Really.

For command options, execute jyn --help

Handling requests

jyn is built on Mädūl. It bootstraps and invokes the madul specified by the action property of the JSON web socket request, executes the method requested, and returns the results.

What does this look like in practice?

  1. mkdir ~/jyn_test && cd ~/jyn_test
  2. npm install -g wscat
  3. jyn
  4. echo 'const madul = { greet: ({ name }) => `Hello ${name}!` }\n' > ./casian.js
  5. wscat -c ws://localhost:1138
  6. {"action": "casian.greet", "name": "World"}

This should result in the response {"result": "Hello World!"}

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago