Usage
Installation
npm install @nx.js/httppnpm add @nx.js/httpyarn add @nx.js/httpbun add @nx.js/httpExample
import { listen } from '@nx.js/http';
listen({
// Listen on port 8080
port: 8080,
// Handle HTTP requests
fetch(req) {
console.log(`Got HTTP ${req.method} request for "${req.url}"`);
return new Response('Hello World!');
}
});