NodeJS web server hello world

Pubblicato il: 04 luglio 2022
sul canale di: elina k
20
1

// To run the app, download NodeJS from here:
// https://nodejs.org/en/
// or run those commands if you are on Linux
// sudo apt-get install nodejs -y
// node -v
// currently using this version: v12.22.9
//run command: node index.js
// Open in browser: localhost:3000

const http = require("http");
const port = 3000;
const server = http.createServer(function (req, res) {
res.write(
`
Hello NodeJS People!
`
);
res.end();
});
server.listen(port, function (error) {
if (error) {
console.log("Something went wrong", error);
} else {
console.log("Server is listening on port " + port);
}
});


In questa pagina del sito puoi guardare il video online NodeJS web server hello world della durata di ore minuti seconda in buona qualità , che l'utente ha caricato elina k 04 luglio 2022, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 20 volte e gli è piaciuto 1 spettatori. Buona visione!