Skip to main content

All Questions

Tagged with
3 votes
0 answers
50 views

Node.js Dumbserver

Dumbserver, or the simplest workable HTTP server. It is supposed to operate in the 'traditional' way, that is, mapping paths in requests to the directory structure. Why did I write it: I needed a ...
gaazkam's user avatar
  • 581
8 votes
2 answers
393 views

Serving a webpage that displays the HTTP request information sent by the client

In order to learn web server programming in Node and JavaScript, I decided to implement a simple web server that only does one thing: Display data of the HTTP request as an HTML table. The actual ...
NPN328's user avatar
  • 771
4 votes
2 answers
184 views

Minimal, very simple, implementation of an HTTP server for static content, using only core node.js modules

To practice the very basics of node back-end, I'm implementing the most basic server possible for static content, using only the core node modules: http fs path With the following server ...
NPN328's user avatar
  • 771
4 votes
1 answer
1k views

Node.js http retry do while mechanism

I have implemented a simple do/while loop to handle a http request to a third-party. I don’t know when the data I receive will have elements in its array so I retry up to 10 times until the array ...
user195155's user avatar
1 vote
2 answers
773 views

Find if cookie name exists in the cookie string

I need to determine whether a cookie name is available or not in the cookie string. I have achieved this. We could use the cookie-parser package but I don't want to use that package so I have written ...
Beginner's user avatar
  • 111
3 votes
1 answer
63 views

Handling download requests using PM2

I Using Nodejs v9.10.1 for handle download operation from another application. When using PM2 in fork mode to make alive my code. After 50 minutes, this will show high memory usage. Server Config is ...
Pasha Aleayoob's user avatar
3 votes
0 answers
34 views

Testing whether pages can be fetched from two ports

I have an endpoint in my API which does a port test on 4455 and 4456 once a client GET's it. This is accomplished by requesting two web pages. The result will respond to the client with a JSON object: ...
Harvey's user avatar
  • 131
3 votes
1 answer
40 views

Initial attempt at node.js automatic redirection

I'm working on a Node.js HTTP server on my iPhone: ...
motoku's user avatar
  • 2,531
2 votes
0 answers
281 views

Request Queue for League of Legends API

I am working on some website for League of Legends statistics, which uses the RiotGames API. The API allows you to do a maximum amount of requests per 10 seconds, and another maximum amount of ...
Danmoreng's user avatar
  • 121
3 votes
1 answer
7k views

Check if the website is up

api.js ...
CodeYogi's user avatar
  • 5,137
2 votes
0 answers
85 views

Node.JS HTTP shortcut wrapper

The Node.JS HTTP and HTTPS modules only provide .get shortcut function, unlike AngularJS's $http which provides them all. I went ...
Samuel Marks's user avatar
3 votes
1 answer
392 views

NodeJS static file HTTP server

I wrote a NodeJS HTTP server specifically for serving static files. I didn't bother much about security since the server is going to be used locally in my Electron application. ...
bool3max's user avatar
  • 199
4 votes
1 answer
65 views

Saving away URL query parameters in an analytics application

We are trying to use NodeJS for analytics. The following code gets the parameter from a URL and dumps it into a flat file. Is there any way to optimize it to get better response time? ...
Rupesh's user avatar
  • 43
6 votes
3 answers
297 views

Concise HTTP server

Here's my code for a consise node.js HTTP server. It does work as intended, but I'd like to ask if there's any glitch or to be improved. ...
smith K's user avatar
  • 181
2 votes
2 answers
145 views

AJAX call to make an HTTP request

I am using node.js with express. There is a button that the user can click, and doing so calls this method on the server: ...
Will's user avatar
  • 123

15 30 50 per page