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
gjsify install @gjsify/http
# npm or yarn also work (e.g. adding it to an existing project):
npm install @gjsify/http
yarn add @gjsify/httpUsage
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