Skip to content
/ jyn Public

A simple, fun, fully asynchronous api framework - built on madul

License

Notifications You must be signed in to change notification settings

bsgbryan/jyn

Repository files navigation

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:https://localhost:1138
  6. {"action": "casian.greet", "name": "World"}

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

About

A simple, fun, fully asynchronous api framework - built on madul

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published