NodeJS - All Forum
server error
import app from "./app.js"; app.listen( PORT, ()=>{ console.log(`Server now listening on port ${PORT}`) } )Why isn't it working?
- 2 Comments
- 251 Views
- Share:
- 1
- 0
Conditional statement using switch operator
The switch operator method is another way of writing your conditional statements. It involves the use of Switch keyword and create case inside it to make your conditions work. Check the picture for more info on how to use your switch operator
- 0 Comments
- 164 Views
- Share:
- 1
- 0
- 1 Comments
- 211 Views
- Share:
- 0
- 0
Node ser error (NODEMON)
Emitted 'error' event on Server instance at: at emitErrorNT (node:net:1924:8) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { code: 'EADDRINUSE', errno: -4091, syscall: 'listen', address: '::1', port: 5000}Node.js v20.12.2[nodemon] app crashed - waiting for file changes before...
- 1 Comments
- 259 Views
- Share:
- 0
- 0
Node server error
I'm getting this error on my node terminal Error: listen EADDRINUSE: address already in use :::5000 at Server.setupListenHandle [as _listen2] (node:net:1897:16) at listenInCluster (node:net:1945:12) at Server.listen (node:net:2037:7) at Object.<anonymous> (C:\Users\KINGSPARK\Desktop\javascript\server.js:20:8) at Module._co...
- 0 Comments
- 199 Views
- Share:
- 0
- 0
Error
$dsn = "mysql:host = localhost:dbname = myfirstdb"; $dbusername = "root"; $dbpassword = "root";try { $pdo = new pdo($dsn, $dbusername, $dbpassword); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (PDOException $e){ echo "Connection failed: " . $e->getMessage();}Connection failed: SQLSTATE[HY000] [2002] The requested add...
- 0 Comments
- 143 Views
- Share:
- 0
- 0
Error
[nodemon] clean exit - waiting for changes before restart[nodemon] restarting due to changes...[nodemon] starting `node server.js`Error: querySrv ETIMEOUT _mongodb._tcp.cluster0.xynaatn.mongodb.net at QueryReqWrap.onresolve [as oncomplete] (node:internal/dns/promises:275:17) { errno: undefined, code: 'ETIMEOUT', syscall: 'querySrv...
- 0 Comments
- 106 Views
- Share:
- 0
- 0