Questions tagged [connection]

Describes a linkage employed for the exchange of information between two distinct points, such as a client accessing a web page, database, web service, or any other type of server.

Ways to execute JavaScript once the connection has been established?

Being new to Node.js, I am attempting to modify the example of the Smartphone Remote Control with Node.js and Socket.io by Nick Anastasov to eliminate the need for a password. In the original code, the app.js file sends { access : 'granted' } after enteri ...

experiencing difficulties when trying to establish a connection to a MySQL database using PHP

I have encountered an issue while working on my new project. Despite inputting the correct DB name and user name, I am still receiving an error when trying to connect to my database. The error message reads: Fatal error: Uncaught Error: Call to undefined ...

Managing error exceptions during the login process using NodeJS and MySQL

Recently, I've been diving into the world of NodeJS in an attempt to set up a login process. I've taken on the challenge of handling errors and exceptions in my code. My main concern is ensuring that each 'if' statement is accountable for specific error co ...

Unleashing the Power to Sever a Connection in Node.js

For my school assignment, I've been tasked with creating an http server using only native modules in node. To ensure that the server doesn't get overloaded, I implemented a method where each request is hashed and stored. Once a specific request exceeds a c ...

Is there a way to obtain only the count result?

I am working with a connection using msnodesqlv8 and trying to count the number of records in a table. The result I am currently getting is { total: 26 }, but the expected result should be simply 26. Below is the code snippet that I am using: pool.conn ...

Ending the connection to the mongodb database

I am using the native MongoDB driver with ExpressJS and I want to optimize my code by minimizing the opening and closing of connections in my routes. My goal is to open a connection once, use that same connection in all subsequent functions triggered by ne ...

Is there a way to detect the presence of a named pipe in Node

When attempting to use named pipes in my application, I face an issue. If I try to connect to the named pipe before the server is running, an error occurs: events.js:141 throw er; // Unhandled 'error' event ^ Error: connect ENOENT & ...

What is the best way to trigger Ajax OnClick from a Provider Web Part to a Consumer Web Part?

I'm currently working on managing an ajax connection by triggering a button onclick method in a different web part to initiate a partial postback on the consumer side. The process involves Web Part A (Provider) calling a method on Web Part B (Consume ...

Activate and deactivate pconnect functionality

Is there a way to determine if the php pconnect is enabled or disabled by checking a configuration variable? Or is there a specific command on the server that can verify this status? Thank you. ...

The connectivity issue arises when Ubuntu 16.04 Node.JS application fails to establish a connection with the MySQL database, displaying the error message: "Error:

I have been attempting to launch my Node.JS application on an Ubuntu virtual machine that relies on MySQL. However, upon running the app, I encountered an error related to what seems to be MySQL. events.js:182 throw er; // Unhandled 'error' event ...

Issues with connecting to server through Angular websocket communication

I deployed the server on an Amazon AWS virtual machine with a public IP address of 3.14.250.84. I attempted to access it using Angular frontend like so: public establishWebSocketConnection(port : number){ this.webSocket = new WebSocket('ws://3.14.250.84:' ...

What causes a delay in HTTP calls in Chrome when it is in the "Stalled" or "Initial Connection" state? Is it possible for these states to generate multiple threads for the same request?

My application uses Angular on the client side and Java (Spring Boot) on the backend. Occasionally, during some network calls, the waterfall chart gets stuck in either the "Stalled" or "Initial Connection" state. When this happens, I have noticed in my log ...

Hapi.js - A guide on effectively passing connections to plugins

Incorporating Socket.io into my project has been a key component. I have developed a plugin specifically for managing socket connections... await server.register(socket_connections); This code snippet illustrates the structure of the socket_connections p ...

Establishing a Secure Connection between PHP Server and Amazon AWS MySQL Server

Currently, I have set up two servers on Amazon AWS. One server is dedicated to running PHP while the other handles MySQL. Accessing the MySQL database through my terminal and MySQL Query Browser has proven successful. However, I am facing challenges in es ...

In a repetitive manner, Node.js establishes a connection with MongoDB on

I've been searching for a method to perform various operations on a mongo database, depending on the route connected by a user on my website. For instance, performing an HTML POST request to www.mysite.com/data would add information to a mongoDB, while an ...

Using AJAX to remove data from a database

My PHP code snippet is displayed below: AjaxServer.php include '../include/connection.php'; // Check for the prediction if(isset($_POST["delete_me"]) && $_POST["delete_me"]=="true"){ $id = $_POST["id"]; $table = $_POST["table"]; $que ...

utilizing a shared temporary table across multiple PHP files

I have created a temporary table using PHP code, and now I need to access this table from other PHP files or when making multiple ajax requests. However, I want to ensure that the same temporary table is retrieved each time and not create a new one with ev ...

Is it possible for Mongodb to automatically disconnect when the Node server is closed?

Recently, I dove into the world of MongoDB and one thing that has me puzzled is the recommendation to keep the connection open from initiation and reuse it throughout the application. But here's my question - do I need to explicitly close the MongoDB ...

Establishing a Protected Link to a Server through PHP

I'm working on accessing a database located on a server that I only have Remote Desktop access to. What steps do I need to take in order to query this database using my php web application? ...