Content-Length: 466361 | pFad | https://nodejs.org/#alt-docs

Node.js — Run JavaScript Everywhere
Skip to content

Run JavaScript Everywhere

Node.js® is a free, open-source, cross-platform JavaScript runtime environment that lets developers create servers, web apps, command line tools and scripts.

// server.mjs
import {  } from 'node:http';

const  = ((, ) => {
  .(200, { 'Content-Type': 'text/plain' });
  .('Hello World!\n');
});

// starts a simple http server locally on port 3000
.(3000, '127.0.0.1', () => {
  .('Listening on 127.0.0.1:3000');
});

// run with `node server.mjs`

Learn more what Node.js is able to offer with our Learning materials.









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://nodejs.org/#alt-docs

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy