Skip to content

envoy-js/express

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

envoy-js/express

Installation

envoy-js/express is available on npm

Using npm

npm i @envoy-js/express

or yarn

yarn add @envoy-js/express

Examples

Typescript Quickstart

import Envoy from "@envoy/express"
import express from "express";
import {createServer} from "http";

const app = express();
const httpServer = createServer(app);
const port = 3000

interface User {
    username: string
    id: string,
    avatar: string
}

interface Message {
    id: string
    value: string
    roomid: string
}

interface Room {
    id: string
    users: User[],
}

const envoy = new Envoy<User, Room, Message>({userKey: "id" as const}, httpServer)

httpServer.listen(port, () => {
    console.log(`Envoy app listening on port ${port}`)
})

Here is a sample React app

React

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published