Questions tagged [server]

A server can be envisioned as an operational implementation of a software application that has the ability to receive requests from a client and provide suitable responses in return.

Error message "Connection refused because of timeout duration exceeded"

File "/home/abhigenie92/stanford2/Code/dependencies.py", line 18, encountering error in the get_dependencies function: result = loads(server.parse(sentence)); File "/home/abhigenie92/stanford-corenlp-python/jsonrpc.py", line 934, while making a call ...

I'm having an issue with the Next.js Image component not functioning properly on the server

The issue with Next.js Image not working on the server but working fine on localhost has been puzzling me. My assumption was that it could be related to permissions, as I fetch images from a third-party domain. However, when I load images using a regular ...

What are the steps to turn off response data compression in an Express server?

How can I receive the 'Content-Length' response from the server without gzip compression enabled? I am using a compression middleware for this purpose: const shouldCompress = (req, res) => { if(req.headers['x-no-comprassion']) { ...

What is the purpose of using the http module to specify the port when the app.listen function already sets the

var express = require("express"); var app = express(); // This code sets the port to 8080 by default, or else it will use the environment-specific port. app.set('port', process.env.PORT || 8080); app.get('/', function(req, res){ res.send('hello world ...

Are the server updates not syncing with the client browser?

Is there a reason why server updates are not appearing on the client browser? Could it be that a specific attribute value needs to be modified or is this related to caching? app.get('/hello' , (_ , res) => { res.header({ 'Cach ...

Issue with PHP sessions not being preserved when moving across pages of my site

Why is my php session disappearing as I move around my website? I'm in the process of developing a website that requires admins to log in using a simple username-password combination. The workflow involves creating a session when a user lands on the main ...

What could be causing the <img src= ' '/> tag to malfunction in Express?

While learning about HTML, I noticed that simply using img src="...." worked fine. However, when working with Express, the same code did not work! The documentation mentioned that I needed to place the images in a folder named public, require(&ap ...

Dreamweaver constantly combines an external CSS file with locally stored CSS when running on a local server

When I used Dreamweaver CS5, XAMPP Server, and PHP files in the past, I encountered an issue. The websites within my htdocs folder seemed to be pulling a specific website's CSS file. In 'Live View,' I could see all external .css and .js files, but couldn't ...

Encountering the following error message: "MongoServerError - E11000 duplicate key error on collection: test.users, index: email_1. Duplicate key found: {email: null}"

I'm a student working on creating a login authentication API using Node, Express, and MongoDB. My issue is that I can't add multiple users when signing up. Despite searching through numerous threads on this website, I haven't found a solution yet. I feel ...

Is it more efficient to wait for the server to respond, or should I update the client immediately

Today, I found myself contemplating an interesting question. As I work on developing a Single Page Application (SPA) using Angular, I am focusing on creating a calendar module similar to Google Calendar. This module will allow users to add, edit, and remov ...

What are the necessary steps to launch Next.js without relying on Vercel's platform?

Looking to deploy a Next.js app, but not on Vercel. What is the process for deploying it? In the past, I would drag and drop the build folder from React to the server, but with Next.js I am unsure of which files need to be deployed and how. Note: I am ut ...

You cannot assign an array of 'Contact' objects to a single 'Contact' parameter

During the development process, I encountered an error while trying to add a new contact. The error message states: Error: src/app/contacts/contacts.component.ts:32:28 - error TS2345: Argument of type 'Contact[]' is not assignable to parameter of type 'Co ...

Sync user information when alterations are made on a different device

As I create a Discord clone using Next.js, I've encountered an issue where when a server is deleted, another client can still see and use the server until the page is reloaded. When testing out the official Discord web app, changes seemed to happen in ...

How can I resolve the error that says "Module 'util-deprecate' not found in npm"?

As I was trying to install a module using NPM, an unexpected error occurred. Error: Module 'util-deprecate' not found After multiple failed attempts to resolve the issue, including uninstalling and reinstalling Node.js, the same error continued ...

What might be the reason for npm live-server to cease detecting file updates?

Everything was working perfectly on my system, but now I'm facing an issue. I have the live-server version 0.8.1 installed globally. npm install live-server -g However, when I start it, I no longer see the "Live reload enabled." message in the browser c ...

Exploring the challenges of setting up Node in an attempt to unravel AngularJs 1.5

I recently started reading a book called "Unraveling AngularJS 1.5" in order to expand my knowledge on Angular development. Early on in the book, the author suggests installing Node.js, so I went ahead and did that. When I ran Node on the command prompt, i ...

Ensuring Django runserver remains active even after SSH connection is terminated

Currently, I'm facing challenges with getting Apache to work with my Django app. As a temporary solution, I am using runserver on my Linux server to demonstrate the app. The issue arises when the SSH connection is closed, as the runserver stops running. Is ...

Transfer item to receiver using Socket.io in Node.js

On the node.js side, I've written the code below: var filtered = quadtree.filter(function (element) { return element.x > min }) console.log(typeof filtered);//object socket.emit("Sonuç", filtered); This is the corresponding ...

Steps for running a Python script from PHP

I am looking to run a Python script on my server that will execute and return a list of data. How can I run a Python script using PHP and then retrieve the resulting list data in PHP code? For instance, consider the following Python script: import os de ...

Navigating to a different page with fresh data in Express.js

While browsing the homepage, I come across a list of names. Clicking on one of the names triggers a post request to the backend. At this point, my goal is twofold: firstly, fetch the corresponding profile data from the database; secondly, redirect to the p ...

Issues with hot reloading in Express.js - GraphQL API are preventing it from functioning properly

In an attempt to create a mockAPI with hot reload functionality, I encountered an issue. Whenever I edit the schema or the data returned by the server and restart it, the changes are not reflected (I tested this using Postman). I believed that restarting ...

What is the process for halting the Node.js (Express) server running in Hyper Terminal?

After closing hyper terminal when a server (port: 1000) based on Express.js and started with nodemon is running, I encountered the following error upon reopening the terminal and attempting to restart the server. I'm unsure if this issue is related to ...

Encountering an Express.js HTTP 500 ERROR when using res.send("Some text"); is working on the page, however, the error occurs when trying to use res.render('file');

My website has a page located at /request that features a form. The form's method is POST and the action leads to /request. In the POST handler in request.js, the intention is to take action with the form data, like storing it in a database, and then ...

My server is experiencing issues with the functionality of the .htaccess file

My website can be accessed at https://itjmovies.com/milan/public/. I am trying to rewrite the URL using an .htaccess file. Specifically, I want to change it from https://itjmovies.com/milan/public/ to https://itjmovies.com/milan/, but my attempts have not ...

NPM continues to run smoothly in support of the Hastebin server operations

I have set up Hastebin at /var/www/paste/hastebin/ To initiate the NPM server, I need to navigate to the hastebin directory and then execute: npm start This command starts the server with the following output: # npm start > <a href="/cdn-cgi/l/e ...

Transferring an HTML file to a destination stream

Currently, I'm in the process of constructing a proxy server. One of the tasks I'm tackling involves blocking specific URLs. I have developed a simple HTML page that is supposed to display whenever a blocked URL is requested, but unfortunately, it's not f ...

"Can you provide guidance on how to access an array within another array

How do I retrieve data from Facebook Graph API such as [message] and [created_time]? Below is the JSON response I receive from Facebook Graph API: Array ( [posts] => Array ( [data] => Array ( [0] => Array ...

Error in Node and Express: Unable to access route

Currently, I am in the process of developing an Express application and running into some obstacles with routing. While my '/' route is functioning perfectly fine, other routes are not working as expected. Despite researching similar questions fr ...

Storing user data in node.js using the express-sessionTo save user data in

Using express and express-session with mysql on nodeJS has been successful for me. I managed to set up a cookie and session as well. Take a look at my code: app.use(cookieParser('3CCC4ACD-6ED1-4844-9217-82131BDCB239')); session({resave: true, saveUniniti ...

Sending data from a React client to an Express server using a POST

Currently facing a challenge with sending a post request from React to my Express server backend. The request payload seems to be correctly structured, and I can successfully receive a hardcoded response from the server on the frontend. However, the issue ...

The functionality of Vue Routes is compromised when deployed to a live environment

Hello, I am a newcomer to Vue.js. I am facing an issue with my Vue.js application where I am unable to access the URL '/foo/apple' on the web hosting server after running "npm run build". It keeps showing error 404. I am using HTML5 History Mode ...

What is the maximum number of connections that node's mongoose and mongodb can support without causing a server crash?

Considering creating an API using NodeJS with mongoose has crossed my mind. I understand that mongoose typically uses one connection per app. However, if we were to hypothetically have 300,000 users simultaneously joining a live room to participate in ans ...

troubleshooting a React project with express server faults

I am currently developing a React application and encountering an issue where I am trying to fetch data from an Express server. Upon checking the browser's console, I see this error: GET http://localhost:3000/api/products 404 (Not Found) Beneath th ...

Providing the module with the URL

How can I retrieve the URL within a module? module.exports = function(app, Reviews, Anon, User, url){ var url = url; console.log("url", url)// url is undefined how to get url function postHandler(req, res){ } app.post("/individual/"+ u ...

Guide to adding server action listeners in a Vue.js application

I am currently working on developing a straightforward chat application using vuejs and socketio. My goal is to send messages from one user to all other users in the chat. Below is the code I have implemented on the server side to achieve this: io.on(&apo ...

There seems to be a problem communicating securely with the server due to an SSL handshake failure with error code 14077410

$ch = curl_init(); $clientId = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; $secret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; curl_setopt($ch, CURLOPT_URL, "https://api.sandbox.paypal.com/v1/oauth2/token"); curl_set ...

Is it acceptable to refrain from responding to URLs being tested by individuals conducting penetration tests on my Node/Express website?

My website logs all 404 errors. Lately, I have been consistently receiving them for pages that are not linked on my site, indicating that someone, most likely a bot, is attempting to access admin pages or secure files like /wp-admin.php. router.get(' ...

Experiencing difficulties launching my Server.JS due to a listening error

Hey there, I'm struggling to get my server.js up and running. Whenever I try to run node on it, I keep getting the error message "listening on *:3000". Below is the code for my server.js: var app = require('express')(); var http = require('http').createSer ...

Issue with Nginx setup - Unable to establish connection between three distinct servers (Client, API, Database)

What I am attempting to achieve I am currently working on setting up a connection between three individual servers (Client, API, and mySQL) by creating three VMs locally with the following IP addresses. Below is a simple testing React/Node code for each s ...

Developing and updating API services in Node.js while connected to the internet

Our team is currently working on creating a Node.js application (or Service) that will generate custom APIs for each user, accessible at {theirUserName}.ourwebsite.com. Users will have the ability to modify endpoints, add parameters and authentication usin ...

Exploring the limitations of middlewares in supporting independent routers

When I examine the code provided, it consists of three distinct routers: const Express = require("express") const app = Express() // Three independent routers defined below const usersRouter = Express.Router() const productsRouter = Express.Router() cons ...

Designing an architecture with Rails API and VueJS server layout

Currently, I am working on a Rails API only app for the backend, along with two VueJS apps serving as the front ends. These Vuejs apps are making multiple calls to the Rails API. As I contemplate deploying my project to Digital Ocean, one question arises: ...

Flask Server produces a response with a considerable delay when accessed through AJAX

I am currently running 2 servers on localhost, each with different ports. One of them is a basic flask server in Python and its code is provided below: from flask import Flask,jsonify from flask_cors import CORS app = Flask(__name__) CORS(app) @app.rout ...

Implementing multer diskStorage with Typescript

I'm currently in the process of converting a node.js server to TypeScript. Here is what my function looks like in Node: const storage = multer.diskStorage({ destination: function (req, file, cb) { const dir = './uploads/'; mkdirp(dir, ...

pdfmake lacks the ability to embed fonts and text in node.js

I'm encountering an issue with pdfmake while trying to generate a PDF on a node.js server. My goal is to fetch data from a database, create a visually appealing table, and then save it as a file in a specific folder. var pdfMakePrinter = require(&apo ...

Specification for Application Input: Receiving input information for a specific method

Is there a recommended method for visually representing the input data structure required for a server application? I am working on specifying the correct input data that the server will receive via an http post request. The data being sent is a complex js ...

Melodic Streaming Platform

I currently have a client-side application built using React. I have a collection of music stored on my Google Drive that I would like to stream online continuously. I lack experience in server-side programming. Can you suggest any resources or steps I s ...

An efficient method for extracting targeted information from a JSON encoded string

While working on some code, I encountered the following output when echoing this piece of code: echo json_encode($_SERVER); Output Received: { "HTTP_CONTENT_TYPE":"application\/x-www-form-urlencoded", "HTTP_USER_AGENT ...

Send a quick response and retrieve it in the client application

My goal is to allow the user to send data to the server, where it will be saved into a database. After this process, I want to send a message back to the user (which could include the ID of the newly added object). However, I have been struggling with my c ...

Adding an unnecessary identification number without justification

Here is the code snippet I am working with: const Message = connection.define("message", { room: { type: sequelize.STRING, allowNull: false, }, name: { type: sequelize.STRING, defaultValue: "Anonym ...

Issues with routing in Node.js using Express

This is my first attempt at programming. I am currently in the process of setting up routing in the following way: var indexRouter = require('./routes/index'); var loginRouter = require('./routes/login'); app.use('/', indexRouter); app.use('/login', login ...

Setting up a Node application on a server with the help of Apache, npm, and pm

            I recently deployed a Node.js application (myapp.js) on a server with a specific IP address. The installation and startup process using npm went smoothly this time around, unlike past experiences with Apache which were much more complic ...

The output from the Moment.js HTTP server is currently experiencing errors and is not displaying the expected

My first time working with JavaScript and the Momentjs library has not been smooth sailing. I am facing an issue where the output is not displaying as required. The goal is to show dates in the format "Day, date month year" (e.g., Tuesday, 14th May 2018). ...

Advancement of server-side actions in NextJs 13 or 14 can now be tracked in

Is there a method to notify the client of status updates during server actions in NextJs 13 or 14? For example, if you have a server action that involves processing 1000 database records, how can you display the progress of this activity to the client? ...

Utilize HTML or JavaScript to make a POST request with Express

Recently, I decided to dip my toes into the world of back-end development using express for the first time. I came across a situation where I needed to make a POST request from an html/js file, and initially used Jquery to accomplish this task. However, I ...

The website is functioning properly on port 8080, however, it is not working on the root directory

My website is functioning properly with the domain name test.in:8080, however it is not working on just test.in. Here is an excerpt from my nginx.conf file for reference: server { listen 80 default_server; listen [::]:80 defaul ...

The password entered does not match the hashed and salted password in PHP during login

Currently working on a project in Unity where I am trying to implement account creation, login functionality, and saving user data using PHP and MySQL. The registration process is successfully completed, however, I am facing issues with the login process. ...

What steps are involved in setting up a React app on a server?

I'm in the process of figuring out how to deploy my react app online. Up until now, I've been running it on my mac using npm start, and accessing it through localhost:3000 or http://127.0.0.1:3000. Recently, I purchased a small server, installe ...

I am eager to launch my Node.js Server on Azure App Services

While attempting to deploy my node.js server on Azure using app service, I consistently encounter various errors. The issues range from the build command being unavailable in the configuration to difficulties fetching content. It has become quite frustrati ...

The Socket.io client establishes connections with multiple servers simultaneously

Imagine this scenario: I am using nodejs and socket.io, and a question comes to mind. What would happen if one client establishes connections with multiple servers like this: socket = io.connect('http://server1') //600k sockets already connecte ...

The challenge of obtaining a URL as a query string parameter in Node.js Express

What is the proper way to include a URL as a query string parameter in node.js? For example, if I were to access the browser with the following URL: http://localhost:3000/key1/https://www.google.com/key2/c, I am encountering difficulties retrieving value ...

Setting up Webpack with a Node.js backend

After successfully creating a structured outline for my React App, I have now uploaded the code to Github for easy access: https://github.com/KingOfCramers/React-App-Boilerplate. To launch this React server using Node and Express, I found a helpful guide ...

My React website fails to show up on the server

Struggling to deploy my create-react-app on a server. I followed the instructions, created a homepage field in package.json, set it to a domain address, and ran npm run build. However, resources online are scarce for what to do next. When I run npm start ...

How does cPanel go about setting up user accounts?

Is there a way to programmatically create websites/accounts on a server without using cPanel, such as through node.js or PHP? How does cPanel handle this process? I understand that websites are typically generated by making changes to the Apache configura ...

Encountered an error while setting up Angular 2 Server with Express: ERR

My website was built with Angular2 on the frontend and Node/Express on the backend. The frontend runs on port 4200 (run npm build to start it) while the backend runs on port 4201 (npm start). I have a user login management view that works perfectly on loc ...

Methods for establishing communication between a React server and a Node server using private IP addresses

I currently have three EC2 Instances on AWS React Server Instance Node Server Instance MongoDB Server Instance My goal is to establish a connection between my React Server and Node Server using the Private IP address. For security purposes, I do not want ...

Python event-driven long polling server (similar to the current PHP server)

I have a straightforward php script (currently running on xampp) for a long polling server, but I am interested in converting it to Python and creating a Python server instead. Despite my limited experience with Python, especially in the realm of web serve ...

Upon adding data to mongodb, an error message is displayed stating "Cannot read property '_id' of undefined."

Backend Server-Side Code The following is my server-side code. Below it, you can find the client-side code along with the error that is being displayed. I am having trouble identifying what the issue might be. app.post("/service", async (res, re ...

Having trouble connecting to CSS in a node.js HTML document

My website is encountering an issue where the CSS fails to load, and I am receiving the following error message: Refused to apply style from 'http://localhost:5000/server/nodeClient/public/css' because its MIME type ('text/html') is not a supported stylesh ...

Maximizing Server Efficiency with PHP Functions

Suppose I have the code snippet below: <?php function someFunction() { //many lines of code } if ($someBooleanVariable) { //random code here } else { someFunction(); } ?> Query 1: Is it accurate to assume that the server will first lo ...

What is the process of creating a for loop in FindById and then sending a response with Mongoose?

Is there a way to get all the data in one go after the for loop is completed and store it in the database? The code currently receives user object id values through req.body. If the server receives 3 id values, it should respond with 3 sets of data to th ...

Issue with Cache in VueJS Application on Windows Server 2016 Running IIS 10

I am currently running a VueJS application on a local IIS 10 server for internal company use. However, I've encountered an issue where the index.html file seems to be cached, requiring manual browser clearing to see updates. I have read about potential s ...

The React development server is currently inaccessible due to an error: ERR_CONNECTION_REFUSED

I'm currently attempting to locally run a React application by using npm start, however, I'm encountering an issue with connecting to it through my web browsers (both Chrome and Firefox). The error message I'm receiving is ERR_CONNECTION_REFUSED. The cons ...

Communication between IOS and PHP applications

My phone data needs to be securely transmitted to my server without encryption. The priority is ensuring that the data originates from my app and not just a browser refresh. I am seeking creative ideas on how to achieve this. Any suggestions would be muc ...

Is there a way to set up IIS to host my NodeJS REST API on a unique URL without having to expose any additional ports?

Recently, my organization provided me with a Windows Server running Windows Server 2019 and IIS. I have successfully configured PHP and MySQL to host my website on this server using IIS. However, I have now developed a new service using Node.js that serve ...