@tynes/redux-ws-server

0.0.3 • Public • Published

Redux Websocket Server

Usage

Proxy requests from an HTTP webserver via websockets to redux middleware and dispatch the action.

Very light on dependencies, no express, no socket.io.

The webserver is currently password protected via basic authentication.

API

  • GET / - get the server status
  • POST / - the post body is interpreted as the action

Actions generally have the shape of:

{
  "type": "BAZ",
  "payload": { "foo": "bar" }
}

Configuration

Configure the server with runtime environment variables.

REDUX_WS_SERVER_PORT=8084
REDUX_WS_SERVER_USE_BASIC_AUTH=true
REDUX_WS_SERVER_BASIC_AUTH_USER=default
REDUX_WS_SERVER_BASIC_AUTH_PASSWORD=default
REDUX_WS_SERVER_LOG_LEVEL=debug

TODO

  • serve via https

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    0
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i @tynes/redux-ws-server

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

83.4 kB

Total Files

10

Last publish

Collaborators

  • tynes