Backend - 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?

  • 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

  • 1
  • 0
Node js server error

  • 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...

  • 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
  • 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
  • 0
What Is Looping, How to declare it , which one do you like most

  • 0
  • 0
Lottery Game play

Hello Folks;On the picture is my front-end then this is my loop code, and the action code but each time i thick on the respective box am expected to get the value number of the boxes i checked but i keep getting this error Warning: Undefined array key "thick" in C:\Users\pc\Backend_class01\play_game.php on line 12please i need to know where am not doing it right being that the...

  • 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&nbsp; &nbsp; at QueryReqWrap.onresolve [as oncomplete] (node:internal/dns/promises:275:17) {&nbsp; errno: undefined,&nbsp; code: 'ETIMEOUT',&nbsp; syscall: 'querySrv&#...

  • 0
  • 0