Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

logux/client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

1,104 Commits

Repository files navigation

Logux Client Cult Of Martians

Logux is a new way to connect client and server. Instead of sending HTTP requests (e.g., AJAX and GraphQL) it synchronizes log of operations between client, server, and other clients.

This repository contains Logux base components to build web client:

  • CrossTabClient and Client to create web client for Logux.
  • IndexedStore to store Logux log in IndexedDB.
  • badge() widget to show Logux synchronization status in UI.
  • status() to write own UI to show Logux synchronization status in UI.
  • attention(), confirm(), favicon() to improve UX in Logux web app.
  • log() to print Logux synchronization status to browser DevTools.

Check demo page for widget UI.


Made at Evil Martians , product consulting for developer tools.


Install

npm install @logux/core @logux/client nanostores

Usage

See documentation for Logux API.

import { CrossTabClient, badge, badgeEn, log } from '@logux/client'
import { badgeStyles } from '@logux/client/badge/styles'
let userId = document.querySelector('meta[name=user]').content
let token = document.querySelector('meta[name=token]').content
const client = new CrossTabClient({
 subprotocol: 1,
 server: 'wss://example.com:1337',
 userId,
 token
})
badge(client, { messages: badgeEn, styles: badgeStyles })
log(client)
client.start()

About

Logux base components to build web client

Resources

License

Stars

Watchers

Forks

Contributors

AltStyle によって変換されたページ (->オリジナル) /