Skip to content

Simple

This starts an HTTP server listening on port 3000. It responds to all requests with a Response with status 200 and body "Welcome to JSTime!".

See JSTime.serve for details.

const server = JSTime.serve({
port: 3000,
fetch(request) {
return new Response("Welcome to JSTime!");
},
});
console.log(`Listening on localhost: ${server.port}`);