0
votes
0answers
4 views

How to apply javascript to html simulating a browser

I've already searched on the Internet how to "create" a simple headless browser, because I was interested to know how does a Browser works internally. I'd like to implement a simple headless-browser. ...
0
votes
2answers
23 views

How to make async calls to run synchronously with Promises in Node.js?

I am new to Javascript and having trouble understanding how to make my functions run after one another. I want to use Promise to achieve this. I am following Facebook Messenger tutorial to make a ...
1
vote
0answers
8 views

Packaging sub-modules with rollup for node

I have a library (ES6) which is composed on many sub-modules, say - package.json - lib - my_package - file1.js - file2.js - sub_module1 - file3.js - file4.js I currently do ...
1
vote
0answers
13 views

Webpack to simply compile a bunch of Pug templates to HTML

Im getting started with webpack but one thing I cannot for the life of me work out is how to take a folder (with possible nested folders), full of .pug templates, and simply compile them to static ...
1
vote
1answer
22 views

“TypeError: this is not a typed array.with” WS.js in Node.js

I have only this in my server file and the error appear: const WebSocket = require('ws'); const wss = new WebSocket.Server({ port: 9000 }); wss.broadcast = function broadcast(data) { wss.clients....
-1
votes
1answer
10 views

Node.js with Mysql pool never exit

When I am trying to run the code below, it is getting stuck at the waiting status. I'm new to Node.js, can somebody help me point out the mistake? import mysql from 'mysql' var sql = "select * from `...
0
votes
1answer
22 views

Pushing data from one client to another using Php

I am making my college project on Air Quality Monitoring System, in that data (say some integer value) has to be taken from sensing unit to a webpage. What I want Is that the script called upon by ...
0
votes
5answers
26 views

NodeJS: Good way to write Multiple API Calls in serial

Is there a better/more beautiful way to call multiple APIs after another (in serial) as in my example? var request = require('request'); request('http://www.test.com/api1', function (error, ...
0
votes
3answers
28 views

getting empty array on express response

I am working on an example, I am trying to get a single employee instance from this express example, but when I type, localhost:3000/1, I am getting an empty array. does anyone know what I am doing ...
-1
votes
0answers
9 views

Client browser crashed on multiple Meteor method calls

With var i = 600;, I execute a loop to call a meteor method. This meteor method will read an .EML file and save it to the database. To return the result in each iteration, I used Future package. The ...
0
votes
1answer
16 views

Chat bot command cooldown

So I'm working on a Discord Bot that uses discord.js, a node.js wrapper for the Discord API. Basically the code works like this: /* A ping pong bot, whenever you send "ping", it replies "pong". */ ...
0
votes
1answer
22 views

How to get required type of files from a directory and required content using node js?

Am developing node js application to extract some content alone from XML or HTML file. Am using a windows machine. Some Npm packages are working only in apple or Linux machine, i could not use it. I ...
0
votes
1answer
16 views

Error “Your client has issued a malformed or illegal request” while trying to get search results from youtube

I'm trying to get the page for the search results of youtube.Here I have input a video name and Iam trying to get the html page of search results. I used the http module for sending and recieving ...
1
vote
0answers
25 views

Gulp Copy config.json to dist folder is not working

I use the following code for babel transpile of code. my app is built like following src - bin --www - routes --index1.js --index2.js - config.json - gulp.js Now I want that all this ...
0
votes
0answers
5 views

How to configure a parse-server app to run Cloud Code on back4app

A brief and clear explanation of how we configure the app.js file and whether we need to require parse-server in it is needed basically. Which files should and shouldn't be related with each other? ...
0
votes
1answer
26 views

Certain routes go to 404 error page express

I am setting up my first node project. I had all the pages working nicely until I started to move some thing around. I have done all of my routing for different pages in index.js. I have changed that ...
0
votes
1answer
13 views

How to detect unexpected end of request in Express while the request body is being piped into a child process stdin

I have a child process spawned in my Node.js app, the request body payload is piped directly to the child stdin. Even though the client TCP socket is closed, no relevant events are omitted. What I ...
0
votes
0answers
28 views

How to send array request with Postman and handle its transaction script with node.js to save in MySql

In my Android application, I try to send a List<MyClass> list through Retrofit to my server database. Achieved some web services and scripts but with in array request I need a hand. I need to ...
-2
votes
1answer
26 views

Javascript/Loopback - array.length returns 0

I am using loopback to read list/array of customers. I stored customer array in $scope.customers.customerList. When I first log, the array seems fine but when I get its length, it seems to get lost ...
1
vote
1answer
30 views

What is a node child process?

I'm reading a node.js project which includes the child_process library. What exactly is a child process? Is this similar a javascript web worker? What advantages are there to running processes in a ...
0
votes
2answers
35 views

node.js - Static files CSS / JS not working in express

I Understand many people have asked the same question but i just can't get this to work for me at all. I am trying to make a socket.IO application and are following the tutorials but just can't get ...
1
vote
4answers
28 views

node.js returns undefined issue

Any ideas why I am getting undefined when I try to output helpers.limitsOfToday.todayStart? If I try to output helpers.limitsOfToday I can see the function. This is my code: helpers.js file const ...
-1
votes
0answers
11 views

Live chat and screen sharing [on hold]

i have a project . and im kind of stuck of how to implement this feature . i have and admin (which is a professor ) which is connected to a server (i a local network ) and some clients (students ) ...
0
votes
2answers
35 views

NodeJS this reference

I have the following code this.userInfo = 'bla'; request({ url: 'https://api.api.ai/v1/entities?v=20150910', headers : { Authorization: "Bearer " + process.env....
0
votes
0answers
29 views

Error: (SystemJS) Unexpected token < SyntaxError: Unexpected token < at eval (<anonymous>) Angular 2

I am trying to use full page with angular 2, I am getting the below error when importing it in my app.module.ts. "(SystemJS) Unexpected token < SyntaxError: Unexpected token < at ...
1
vote
0answers
49 views

Node.js for asynchronous execution? [on hold]

I have read high level stuff about node.js on google. Main reason given to use node.js is that it supports asynchronous execution . I discussed with some architects who are using node.js in their ...
2
votes
0answers
23 views

Support ES6 module syntax along with CommonJS

So I have this simple module: export default function(){} if I don't use export default, then the TypeScript compiler will write one warning saying my "module has no default export", which I'd like ...
0
votes
1answer
19 views

Meteor HTTP.call returning incomplete / truncated response

Using HTTP.call() on the server, I'm getting varying response lengths (for the same endpoint) even though the response headers contain a consistent content-length. In other words, the response is ...
0
votes
0answers
12 views

Gulp browser-sync not monitoring and injecting files

I have following directory structure workspace |--dev |--proj |--css |--style.css |--js |--app.js |index.php |something....
0
votes
1answer
30 views

Cannot serve angular 2 index.html file from express server due to path relativity issue

This is my app folder structure with the angular-client folder The below picture shows the issue where when I server the index file of angular app from express server , all the gets are relative to ...
0
votes
1answer
22 views

Unable to iterate over an array

I am testing out the nodejs modules x-ray and cheerio Following is my code: const Xray = require("x-ray"); const cheerio = require('cheerio'); const xray = new Xray(); xray('https://news....
0
votes
1answer
28 views

Client-side cannot locate socket.io.js

I've read all other posts on this topic but I cannot find answer for my problem. I have Express server running on default port or 5000 (process.env.PORT || 5000). I then added socket.io but client-...
-1
votes
1answer
26 views

How to manage backend of React.js website? [on hold]

So I have been planning to build website in React.js for a while and need to store/access basic user data from a database. Since React is strictly a front-end framework, how can I access user data to ...
1
vote
0answers
16 views

Clarifying Mockgoose/Mongoose usage?

I'm currently bound to using Mockgoose/Mongoose for a small NodeJS demo and have some questions about it's purpose and functionalities. I'm aware that Mockgoose is a non persistent database deployed ...
0
votes
0answers
20 views

“Load More Buttons” not working with two seperate lists “.each” properly?

I want to make two load more buttons that load the specific list that they are connected too with id or class or etc. So far my code populates the lists incorrectly for example when i click the view ...
0
votes
1answer
16 views

Node Redis Command Will Not Run?

This is boggling my mind. I have a BLPOP that triggers the following source code below. When the source is first triggered only the first Redis call gets triggered... the second does not get ...
0
votes
1answer
13 views

how to serve Twiml Nodejs

I am having a hard time create my TWIML files with nodejs. I am creating outbound calls and they work with a static XML file or twiml bin but not my endpoint. do you know what is wrong? app.post('/...
0
votes
0answers
27 views

Way to get num of users connected Nodejs

I am programming a chat with Node. Everything is almost done. There are diferrents chatrooms. Example: if someone is in the Room 1 only will get message from this room. But I'd like to know the best ...
0
votes
2answers
35 views

Access AJAX POST data with Node.js/Express

I'm building a web application that uses Node.js/Express for the backend. In my front end, I am sending an AJAX request to the server through Javascript that looks likes this: var xhttp = new ...
0
votes
0answers
13 views

Elevation of entire Electron app / Mounting to /Volumes on MacOS Sierra

First time question poster but long time user. I'm currently writing an Electron app that runs on Windows and OSX/MacOS. This app has a portion of it that mounts network locations using SMB protocol ...
0
votes
0answers
10 views

back4app problems with cloud code invalid function

My issue is this: I have to implement some payment in an app iOS with conekta, I have the server running in back4app nicely before when I had only functions for braintree in the cloud code was playing ...
0
votes
2answers
53 views

fs.readFile is very slow, am I making too many request?

node.js beginner here: A node.js applications scrapes an array of links (linkArray) from a list of ~30 urls. Each domain/url has a corresponding (name).json file that is used to check whether the ...
-1
votes
0answers
14 views

How to turn off the highlighted white space in WebStorm?

How on earth do i turn off this highlighted white space feature in WebStorm? I saw a fix for it in Intellij but I could not find the 'language injections' settings in WebStorm EDIT: Solved it. Just ...
0
votes
0answers
29 views

node.js username and password authentication 4

Ok so i have code that works for a username and password it goes to a website that says login, i want it to go to a website that says login.html but it doesn't, so this is the code for the index....
-1
votes
0answers
20 views

Returning multiple HTML in node.js [duplicate]

I am writing some code that would allow me to click on different links and open different pages with node.js. var http = require('http'); fs = require('fs'); var webs = ['./index.html', './...
0
votes
1answer
9 views

Discord.JS | Getting channel object returns undefined

I have some issues understanding the Discord.JS module, I have no clue of how to connect my bot to a server, even after looking at a lot of documentaries! var Discord = require ( 'discord....
1
vote
1answer
50 views

Better Method to Replace If/Else Chain

I am trying to simplify my controller that is being used within my SQL command to filter records based on specific criteria. My attempt below works, but has many flaws. The most obvious is that it isn'...
-1
votes
1answer
23 views

express node server return a value to async client call

Sorry, I tend to be a bad writer when I have not fully woken up, let me revise. I am using expressjs with passportjs (local strategy) to manage my server and using connect-busboy to manage file ...
0
votes
2answers
25 views

Node Webkit: Nothing displaying?

I have just started with Node-Webkit and I have an issue. I have coded my code below but nothing is displaying and no file is created which I declared to be created. I have npm installed fs and os but ...
0
votes
1answer
19 views

Task 'browser-sync' is not in your gulpfile

I just started to use browsersync. So I started learning about gulp. I installed gulp using npm install gulp -g command. After this I initialized my project directory with package.json file by ...