From eaa97f0598b6fdc56ad60bec17bce72ab1908bb5 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Sat, 17 Mar 2018 17:52:01 +0100 Subject: [PATCH] update readme --- README.md | 5 +++++ ts/smartsocket.classes.smartsocket.ts | 1 + 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 524512e..c4c867f 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,11 @@ let mySmartsocket = new smartsocket.Smartsocket({ port: 3000 // the port smartsocket will listen on }); +// optional: +// run this with anothoer existing server like express +declare var someExpressServer // read the express docs about how express actually works +mySmartsocket.setServer(someExpressServer) + // A "SocketRole" can be referenced by "SocketFunction"s. // All "SocketRequest"s carry authentication data for a specific "SocketRole". // "SocketFunction"s know which "SocketRole"s are allowed to execute them diff --git a/ts/smartsocket.classes.smartsocket.ts b/ts/smartsocket.classes.smartsocket.ts index 80919bf..92212f6 100644 --- a/ts/smartsocket.classes.smartsocket.ts +++ b/ts/smartsocket.classes.smartsocket.ts @@ -47,6 +47,7 @@ export class Smartsocket { /** * starts the server with another server + * also works with an express style server */ async setServer(httpServerArg: http.Server) { this.httpServer = httpServerArg;