nodejs hello world
alert("Hello world");const http = require('http');
const hostname = '127.0.0.1';
const port = 3000;
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello World');
});
server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`);
});const express = require('express')
const app = express()
const port = 3000
app.get('/', (req, res) => res.send('Hello World!'))
app.listen(port, () => console.log(`Example app listening at http://localhost:${port}`))console.log('Hello, world');// You can use apostrophes, quotation marks or tildees which are `s
Also in JavaScript:
- how to get selected list item value in javascript
- javascript element distance from top
- how to iterate object inside object in javascript
- default value of functin atribute
- jwt refresh token
- how to make an express server
- resellerclub api with react js
- material ui grid react
- toggle class in javascript
- javascript array merge
- the simulation using expo won't start - react native
- how to set view engine in express
- get current week number javascript
- state in react
- The server responded with error 50007
- javascript syntax for check null or undefined or empty
- shuffle array javascript
- random color generator javascript
- javascript cash register
- js takes a string of words and returns the highest scoring word.
- how to empty form after submit react
- javascript extend object
- store console.timeEnd in variable js
- discord js channel send