Git Product home page Git Product logo

chef-js / uws Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 422 KB

Command Line Interface Static Files Server written in TypeScript for Single Page Applications serving in Node with Microwebsockets

Home Page: https://chef-js-uws.herokuapp.com/

JavaScript 67.34% TypeScript 32.66%
chat cli http-server javascript nodejs nodejs-server realtime ssl typescript uwebsocketsjs websocket websocket-client websocket-server websockets

uws's People

Contributors

prozi avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

trasherdk

uws's Issues

Unable to receive/respond HTTP requests

A simple chef-uws server does not seem to be able to receive and respond to HTTP requests:

const server = await startServer({
  port: Number(process.env.PORT || 4200),
  join: "/join",
  leave: "/leave",
});

server.any("/*",  (res, req) => {
  res.writeStatus("200 OK").end("Hello!");
});

Server `get` results in routing error (crash)

Using get on server instead of any results in a core dump:

import startServer from "chef-uws";

const server = await startServer({
  port: Number(process.env.PORT || 4200),
  join: "/join",
  leave: "/leave",
});

server.get("/*", (res, req) => {
  res.writeStatus("200 OK").end("Hello!");
});

I get the following error:

$ node server.js 
Started uws http app on port 4200
Error: Internal routing error
Aborted (core dumped)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.