Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [node.js]

Node.js is an event-based, asynchronous I/O framework that uses Google's V8 JavaScript engine.

0
votes
0answers
11 views

Understanding aws implementation for transferring data (CSV) from S3 to redshift datastore

I know there are a number of articles only and tutorials that show using RedShift COPY to get a CSV file/content into a redshift database. My question is on implementation. My thought is to place a ...
-1
votes
0answers
17 views

Open NodeJS server socket on public dynamic IP

I am developing GPS tracker server. The tracker app server witch recives latitude and longitude from the client. But the problem is how to set up a TCP socket on public dynamic IP address. How do I ...
-2
votes
0answers
24 views

nodejs with webpack and typescript

So I would like to use nodejs with webpack as I would like to use the functionality where I am able to get absolute paths of files merely using some kind of symbol e.g. resolve: { extensions: ["....
0
votes
0answers
19 views

npm subfolders and git submodule

So I'm wondering how I should go about this. I have a frontend and a backend that's currently meshed together as one git repository. I would now like to separate them into a front end repository and ...
-4
votes
2answers
170 views

Is this an anti pattern in Javascript?

A common pattern I've been using for JS/NodeJS applications is the following: import { utility1, utility2 } function exampleScript() { utility1() utility2() // Does something } Basically my main ...
1
vote
1answer
64 views

Best practices for Docker image node version and .nvmrc

If I'm building microservices using Node on Docker images - it's necessary to keep an idea of what version of Node I'm using. The idea is - I'm going to be running Node locally in development - and ...
0
votes
1answer
120 views

What is it that is so hard about ES6 modules for Node? [closed]

It seems like ES6 imports for Node have been a bugbear for a while. There is the --experimental-modules flag, or options like using Babel - but AFAIK ES6 modules still aren't supported in vanilla Node....
1
vote
1answer
92 views

How to store blog post in database - React & GraphQL

I am building travel blog using React as frontend Javascript framework along with GraphQL. I am doing this project by myself as a pilot test and I am currently in a phase of translating photoshop ...
0
votes
0answers
36 views

separating git repositories for frontend / back end

So I currently have this situation. I'm developing with Vue, and I've got my backend files in the same repository as my frontend (Vue) files. Now, I want to move to typescript and use webpack with ...
0
votes
0answers
39 views

How do I abstract out HttpResponse creation but still allow for custom status codes

I have build a custom back-end in NodeJs using the chain of responsibility pattern so that the system can easily be extended to handle new kinds of requests without modifying existing RequestHandlers. ...
0
votes
0answers
29 views

How should I store multiple, related models when configuration control is required?

My problem: I plan to store a "project" in a database, where a project is composed of multiple items e.g. documents, and each document has multiple items e.g. paragraphs. Paragraphs may cross-...
4
votes
1answer
101 views

Managing private NPM packages and CI/CD

At work we have an application that is run directly on dev machines, but deployed to Docker swarms (a QA swarm and production swarm). The code and CI/CD pipelines are all in GitLab CE. It uses ...
4
votes
1answer
57 views

How do I automate build-publish tasks for my web server?

I'm developing a node.js web server which will have built source code of server and client part at once. I mean, my web server is on the isomorphic level. this means editing source code of client part ...
0
votes
1answer
32 views

How to route/implement port forwarding with AWS/Apache web server (httpd) with a Node.JS app on port 3000?

I'm trying to understand this and having a hard time. I usually use Ubuntu server, with Apache2, and this time I am not. So I'm a bit out of my element. I'm also a software developer and I don't do ...
3
votes
1answer
285 views

NodeJS (ES6): Design Pattern with bind usage

The question is related to the resolution of the this operator in Javascript classes. NodeJS now supports ES6 classes. The problem faced during this is that when a new instance of the class is created ...
0
votes
0answers
55 views

How to create a router-like configuration page on Raspberry PI?

We have a Raspberry PI (with raspbian OS) that runs some application, this application uses a local configuration file that contains some data like username, password, server url etc. We will provide ...
1
vote
1answer
35 views

JavaScript/NodeJS Class Extension vs Adding Properties

I am currently writing a Discord bot and have reached the point of needing a refactor. With this being my first stab at JavaScript/NodeJS and making a bot in general, there are a lot of mistakes I ...
-3
votes
1answer
80 views

ASP.Net WebAPI or Node JS?

I wish to write RESTful web services which can be consumed from a Web Application and a mobile application. The database is designed in SQL Server 2012. I estimate that there won't be more than 1000 ...
-1
votes
1answer
80 views

How to develop larger client-site in-browser apps in javascript?

I'm new to javascript environment (I have background in C++ physical simulations and game engines). With rise of HTML5 and WebGL I was thinking I'd like to try make some games/3D editors using ...
0
votes
1answer
122 views

Class definitions in static getter methods

[Node.js / CommonJS] I'm creating a single GitHub repo for my tool which has a Core, Control, Server, and Client library. It's unlikely that all of them will be used at the same time. I'd like my ...
1
vote
1answer
52 views

Upgrading outdated node.js with many dependencies, should it be done incrementally?

If one wishes to upgrade from Node 0.10.48 all the way to the latest LTS version (8.11.2 as of right now) would it be smart to upgrade only to version 0.12.18 first, and then to 4.9.1 and so on? The ...
0
votes
0answers
54 views

Defining a Semtech UDP protocol packet: Is good idea to use google's protobuf

In an attempt to make a LoraWan node simulator using node.js: https://bitbucket.org/lora_ssl_unipi_sec1718/lora_node_simulator/src/master/ But I have a hard time to define a packet in a similar ...
-7
votes
1answer
112 views

Writing tool to make large number of http requests with sub second accuracy

I'm pondering a project in which one component needs to make a large number of http requests at accurate times. It should, let's say, release a set of 'dozens to hundreds' of requests at 1 second ...
2
votes
1answer
71 views

Does using MEAN stack reduce the need for code and data structures compared to ASP.net with SQL?

I've been writing web applications for almost 10 years. The ASP.net stack has been my bread and butter and although it has a lot of great things about it, I honestly never chose ASP.net. It's just a ...
0
votes
1answer
43 views

Is it a good idea to pass an URL as a parameter for a pass through service?

I'm developing a service in node JS that will act as a middleware for a client calling a third party API. My service will make some security and user roles checks before calling the third party. So ...
2
votes
1answer
113 views

What is the best way to maintain synchronicity between a table that has a list of another table?

I used to do Java development and with JPA, I don't really have to worry about the synchronicity between a table and the lists it owns. For those who don't understand what I mean, here's an example. ...
0
votes
0answers
29 views

GIS design for reducing of traffic and number of requests to server

I explore the world of GIS and try to elaborate an architecture of a GIS service with a lot of objects on a map. Currently, I'm loading all the items in the visible map area. In order to keep a map ...
7
votes
2answers
303 views

Do CPU Intensive/ Data Intensive Tasks belong on the Server

I'm new to server development, and I'm trying to figure out where the division of responsibilities is for Data intensive tasks, I'm using Node.js. As an example say I'm making a Single Page ...
-4
votes
1answer
123 views

Performance comparison of Legacy VB6 Software vs Node.js and React.js

my company just started a new production management software by using serial communication to scales. My company has already developed the software using VB6 in 2006 and keep using that outdated ...
3
votes
2answers
116 views

Securing an API key in a web extension

I'm building a web extension that will be a wrapper for a public API. There aren't any paid tiers for the API currently, but I'm trying to secure the API key so it doesn't get stolen and used outside ...
0
votes
1answer
85 views

Algorithm for graphing heap data from server memory, over long period of time

Right now I am collecting memory information on a node.js server every 100 seconds. I want do display the memory usage info as a graph on the front end. const mem = { heapTotals: [], heapUseds: []...
0
votes
0answers
87 views

LGPL restrictions for a module in a nodejs project

I'm using an open-source LGPL module in a commercial Node.js project where we deploy our Node.js code on the client's servers. I've read that, amongst other legal specifications, i should make it ...
3
votes
2answers
134 views

Does prefetch data by Apache before serving a SPA site hurt performance?

I have this application containing 2 parts: User-facing SPA web served by Apache NodeJS API server When a user go to the SPA web, Apache will do authentication and prefetch data for that user by ...
1
vote
1answer
125 views

How to create a framework in Express.js

I'm trying to figure out how to create a Node.js/Express.js application that is a framework for hosting and running third-party code in my application, and what are the appropriate JavaScript/Node/...
1
vote
0answers
407 views

design pattern/oop for large validation rule set

I'm writing this in node.js I have some data that needs validating before anything can be done with this. The data is validated in two different ways. I can use JSONSchema to validate the structure ...
-2
votes
1answer
119 views

Linux Server Hosting through Cloudflare [closed]

I hosted a hobby NodeJS Server from my Linux and all is fine by accessing my direct IP. Because I find this ugly and also less secure, I decided to route my domain which is set to Cloudflare to my IP....
3
votes
1answer
171 views

How to name two functions that could be named the same?

I have a node app with a queue for processing jobs in the background. I have a file that exports a function which when run, creates a job in my queue. In that file, I also have the handler for this ...
-2
votes
1answer
279 views

PHP or NodeJS for a chat app with message queue

In my company I proposed NodeJS for developing a microservice that acts as a bridge between the front-end and a third party chat API, that Microservice will receive large amounts of messages (about ...
0
votes
1answer
44 views

Performant way for archiving image files in NodeJS on each user requests

Scenario: Images are uploaded to the server once in a while. Users send an API request for downloading all of those images that were uploaded to the server (Images reside in the server itself). ...
0
votes
0answers
47 views

How to implement a session mechanism for an always-open SaaS platform

The SaaS platform I'm working on should have a rather desktop-app-esque feel to it. Meaning it would be the main management software for my client's businesses and will be always open on their ...
0
votes
1answer
185 views

Deploy a NodeJs (FrontEnd) and a Spring (BackEnd) project as one artefact

I have a current project which consist out of two independently developed projects: Spring REST as back end Angular as front end I do have a Jenkins instance available for building my projects and I'...
1
vote
1answer
265 views

Handling Pausable Streams with RxJS

Reading a Node Stream I want to be able to receive a stream of text, and trigger the continuation of my stream. The following code solves my purposes but I recently read that we are using Subject too ...
5
votes
1answer
190 views

Nodejs cluster: are there any downsides?

I was reading a litte about clusters in nodejs, and in all cases it was trivial to clusterize the application. In fact, it was so easy that I began to wonder: are there any cases that I shoudn't use ...
0
votes
0answers
33 views

How can I test an Express Controller that talks to 3rd party integrations?

I have a simple express server. There is a route that accepts both a NPS score and an email in it's req.params. Here: app.put('/api/nps/:score/:email', npsController.sendIntercomNPS) The actual ...
1
vote
0answers
152 views

How to set up servers in node.js for intensive calculations?

I'm developing architecture for devices where requests can be very high in in number, also the data that is received requires to do some intensive computation on it 1) Is there any method to do the ...
1
vote
0answers
108 views

How to decouple a message broker and its message handlers?

Project description: I have a nodejs project where I try to build a bluetooth mesh like network, each node consists roughly of 4 parts the frontend part, the message broker, a bluetooth client and a ...
3
votes
1answer
524 views

Split overlapping ranges into all unique ranges

I am trying to split a dynamic number of ranges with associated attributes, so that whenever 2 or more ranges overlap, the overlapping section(s) are split into unique ranges with the combination of ...
1
vote
0answers
39 views

Exporting functions usable by both client-side and server-side

So this isn't a question on how to do it, but more of a clarification on how it works. I'm using Vue and I'm creating a file that's usable by on both the client side and the server side (logic should ...
0
votes
0answers
47 views

Creating a “clean code” NodeJs Model with additional Ajax Calls

I already asked this here https://stackoverflow.com/questions/47991416/creating-a-nodejs-model-with-additional-ajax-calls but maybe this is not a coding problem. I have a design pattern question. I ...
0
votes
1answer
591 views

An elegant way to detect the end of an asynchronous recursive file search?

Given a recursive subroutine in single threaded environment which starts numerous asynchronous I/O operations and registers callback functions for each of them. This callbacks will be called on the ...