All Projects → QuickJS-Web-project → quickwebserver

QuickJS-Web-project / quickwebserver

Licence: MIT license
Implementation of HTTP web server in the QuickJS Runtime

Programming Languages

javascript
184084 projects - #8 most used programming language
c
50402 projects - #5 most used programming language
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to quickwebserver

quickjs-build
Build for QuickJS JavaScript Engine
Stars: ✭ 25 (+47.06%)
Mutual labels:  quickjs
jsqry-cli2
Small CLI tool (similar to jq) to query JSON using sane DSL
Stars: ✭ 21 (+23.53%)
Mutual labels:  quickjs
quickjs es runtime
this is a wrapper library for the javascript runtime quickjs written in rust which works with modules, promises, async, await and much more
Stars: ✭ 43 (+152.94%)
Mutual labels:  quickjs
Elsa
❄️ Elsa is a minimal, fast and secure runtime for JavaScript and TypeScript written in Go
Stars: ✭ 2,461 (+14376.47%)
Mutual labels:  quickjs
Quickjs
QuickJS是一个小型并且可嵌入的Javascript引擎,它支持ES2020规范,包括模块,异步生成器和代理器。
Stars: ✭ 2,199 (+12835.29%)
Mutual labels:  quickjs
flutter qjs
A quickjs engine for flutter.
Stars: ✭ 94 (+452.94%)
Mutual labels:  quickjs

QuickWebServer

Implementation of HTTP web server in the QuickJS Runtime

QuickJS (© Fabrice Bellard and Charlie Gordon) is a small and embeddable Javascript engine. It supports the ES2020 specification including modules, asynchronous generators, proxies and BigInt.

This repository is an HTTP web server implementation for QuickJS. It consists of two parts:

  1. A shared C library that adds a native module to QuickJS to start a web server and handle requests (uses httpserver.h by Jeremy Williams);
  2. JavaScript API for easy interaction with this module, inspired by Express.js

What the server can do now

  • Handle GET and POST requests;
  • Provide headers, url and request body;
  • Process static files, serve them with the correct MIME type;
  • Provides a convenient API for response: setting headers, content type, sending files.

Is the server ready for production?

Not really. Testing was carried out on macOS and Ubuntu, load tests have not been performed yet. A stable version has not yet been released.

How can I use it now?

QuickJS gives us several benefits:

  • Tiny size of the engine;
  • Relatively high speed of work (benchmarks);
  • Ability to compile your JS application into a native binary application.

Thus, you can use QuickJS and QuickWebServer to build simple microservices, APIs, or serve static sites.

Ultimately, most of the work happens outside the server's area of responsibility (for example, working with databases).

TODOs and known issues

  • No parsing for multipart/form-data body;
  • File uploading via POST multipart/form-data doesn't work yet;
  • Sending a POST request with a file larger than 1MB may cause a server crash;

You can add to this list by opening an issue in this repository.

Documentation

Please see the Docs website (made with QWS)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].