All Questions
21 questions
3
votes
0
answers
48
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 ...
8
votes
2
answers
385
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 ...
4
votes
2
answers
175
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 ...
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 ...
1
vote
2
answers
768
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 ...
3
votes
1
answer
62
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 ...
3
votes
0
answers
32
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:
...
3
votes
1
answer
39
views
Initial attempt at node.js automatic redirection
I'm working on a Node.js HTTP server on my iPhone:
...
2
votes
0
answers
279
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 ...
3
votes
1
answer
7k
views
Check if the website is up
api.js
...
2
votes
0
answers
83
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 ...
3
votes
1
answer
388
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.
...
10
votes
1
answer
6k
views
Node.js parallel file download, the ES6 way
I wrote a script that downloads all PDFs found on the web page of a particular government agency. I would have chosen bash for such a task, but I want the script to ...
1
vote
1
answer
476
views
Simple POST function in ClojureScript and Node.js
Node's HTTP library provides a handy shorthand function for GET requests. Something similar doesn't exist for POST requests. I'm trying to write one in ClojureScript that compiles to node-readable ...
4
votes
1
answer
64
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?
...
6
votes
3
answers
294
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.
...
2
votes
2
answers
144
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:
...
3
votes
1
answer
114
views
HTTP routing framework
I am new to JavaScript programming and would like to get your comments/input or corrections on this chunk of code. I have tried to emulate patterns from recognized GitHub projects but I still don't ...
4
votes
1
answer
287
views
Socket.IO handshake module
For the server of which this is part, it makes a request to one of our web servers to validate whether the PHP Session ID is actually valid. The location ...
8
votes
1
answer
426
views
Download a file and update the current downloaded percentage
I am not a big fan of JS, but have been forced to use it in this situation for various reasons.
My task: Download a URL to a target file, and update another part of the application with the current ...
1
vote
1
answer
119
views
Node.JS HTTP server displaying Google
I'm reading Professional Node.js: Building Javascript Based Scalable Software by Pedro Teixeira and created a web page responding with www.google.de. Could you take a look at my code and let me know ...