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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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

1
vote
0answers
33 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 ...
-1
votes
0answers
11 views

Connecting Apollo Server to OrientDB Graph Database — How to Connect? [on hold]

I'm attempting to create a web application that will rely on fetching data from a Graph Database. My graph database is hosted by OrientDB 3.0. I'm trying to set up Apollo Server on the same machine to ...
3
votes
1answer
49 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
20 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
271 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
34 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
77 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
79 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
81 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
46 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
46 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
110 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
70 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
111 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
242 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
119 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
115 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
71 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
72 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
131 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
120 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
322 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
99 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
169 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
257 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
0answers
136 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
213 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
148 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
141 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
104 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 ...
2
votes
1answer
352 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
44 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
498 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 ...
0
votes
1answer
65 views

What types of operations should go into Node.js as opposed to client side javascript functions

I am building a web app with a lot of different API calls: our own proprietary REST API, third-party library API calls, etc. All of these calls either retrieve data, update data, delete data, or ...
0
votes
0answers
44 views

Design a service that takes a job and perform operations after certain time lags

Scenario: Consider a 'listener'(service) which is ready to accept a job and then waits for x minutes after which it must send an email after checking something from database. If the db condition is ...
2
votes
2answers
275 views

creating nodejs apps in php/mysql framework with later on full step by step migration to nodejs in mind

I'm looking for the most efficient path to convert over time my own made php framework for nodejs and I believe that nodejs experts and specific developers who had their years working with apache/php/...
4
votes
2answers
2k views

What is the point of rooms in socket.io?

I was wondering what the purpose of rooms is. See: https://socket.io/docs/rooms-and-namespaces/ You can basically mimic join and leave with just socket.on and socket.off Take for example: (no room) ...
1
vote
0answers
189 views

Symlinking node_modules to public static assets folder for web development [closed]

I have what I think is a pretty decent solution, just wondering if anyone can see a problem with it. We were using Bower for the last 18 months, but we are moving our public static assets to NPM and ...
1
vote
0answers
38 views

Node JS Tape Unit Testing : All cases inside one function for a method

I am using tape for unit testing in Node JS. I wanted to ask one thing about better coding while writing unit testing. When using different inputs to a single method, is it a better idea to use all ...
0
votes
1answer
41 views

requiring files in nodejs - individual files or group?

When working in NodeJS and requiring custom modules. Is it best practice to require one file that itself requires dependencies, or is it best to explicitly require only the files that are needed? An ...
-1
votes
1answer
42 views

node server structure and technologies - support continuous and high volume (amount, not size) data transfare

I'm having trouble planning the structure of my server side workflow and the technologies I should use. The basic structure and tasks are: Now, things to consider: 1.the server listens to multiple "...
0
votes
1answer
266 views

Micro service architecture : Solving complex queries owned by particular service

I am working micro service architecture and figuring out what is the best way to get complex data from a micro service. So for example : Let's say micro service A is owning data based on any CRUD ...
2
votes
2answers
195 views

Matching 2 sets of items by price

I'm trying to solve the following problem in the most efficient way I can find. I want to trade my items for someone elses items, every item have a price and a value. I want to maximize the value of ...