SERVER PORT NODE.JS
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}`))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}/`);
});
Also in JavaScript:
- ban someone discord js
- javascript events
- Attempted import error: 'uuid' does not contain a default export (imported as 'uuid').
- check if js object is empty
- ... operator javascript
- javascript find file extension from string
- js xmlhttprequest add header
- how to generate random string in javascript
- react native textinput disable keyboard
- nohup run nodejs
- kendo treeview get selected node data
- nodejs copy and rename file
- pass props in react
- open websute react native
- discord js channel send
- next.js with material ui
- javascript location redirect target _blank
- angular get name of component
- last element id javascript
- kendo datetime picket default timezone
- unique array javascript es6 Map
- bodyparser express
- change span value javascript
- node package.json type module