Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
Node.js — Rulează JavaScript oriunde
[go: Go Back, main page]

Skip to content

Rulează JavaScript oriunde

Node.js® este un mediu de rulare JavaScript gratuit, open-source, multiplatformă care le permite dezvoltatorilor să creeze servere, aplicații web, instrumente de linie de comandă și scripturi.

// 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`

Află ce poate oferi Node.js mai mult cu materialele noastre de învățare.