JSPM

  • Created
  • Published
  • Downloads 3813
  • Score
    100M100P100Q124071F
  • License MIT

Node.js http module for Gjs

Package Exports

  • @gjsify/http
  • @gjsify/http/browser
  • @gjsify/http/validators

Readme

@gjsify/http

GJS partial implementation of the Node.js http module using Soup 3.0. Provides Server, IncomingMessage, and ServerResponse.

Part of the gjsify project — Node.js and Web APIs for GJS (GNOME JavaScript).

Installation

npm install @gjsify/http
# or
yarn add @gjsify/http

Usage

import { createServer } from '@gjsify/http';

const server = createServer((req, res) => {
  res.writeHead(200, { 'Content-Type': 'text/plain' });
  res.end('Hello World');
});
server.listen(3000);

Inspirations and credits

License

MIT