Skip to content

Latest commit

 

History

History
25 lines (14 loc) · 1 KB

README.md

File metadata and controls

25 lines (14 loc) · 1 KB

Slow Reader API

Types and constants shared between clients and server.

Subprotocol Version

“Subprotocol” is a client-server API both Logux and HTTP. The term has “sub” because it is inside Logux sync protocol.

Every time we have client-server API changes, we need to update subprotocol version to be able to handle old clients. For instance, mobile app could take months for update.

Server can ask users to update client app if version is too old. Or we can add different handler for old clients.

Logux Actions

We define Logux actions types and action creators here to be sure, that client and server have the same types.

HTTP API

For every HTTP endpoint we define here:

  • URL params and HTTP body types.
  • fetch() wrapper to use in client checking all types.
  • Endpoint definition to use in server helper.

It allows us to verify that client and server API is compatible.