Node.js is an event based, asynchronous I/O framework that uses Google's V8 JavaScript engine. Node.js is commonly used for heavy client-server JavaScript applications.

learn more… | top users | synonyms (2)

0
votes
0answers
29 views

Stack Overflow-like vote system in Node.JS

Here, I have the logic for a "stack overflow-like" vote system and validation to protect the vote. Just wondering if If there would be a better way to refactor / make this more simple and clean? to ...
1
vote
0answers
15 views

Single request weather app using ForecastIO service

I needed a web weather for a app that talks to ForecastIO API. Basically that senta request to https://api.forecast.io/forecast/APIKEY/LATITUDE,LONGITUDE that gives ...
2
votes
0answers
33 views

Input-reading library for Node.JS part 2

Note: This code is a rewrite of the post I mentioned here since according to CR policy I cannot update the same question. This is somewhat didn't went through that much thought process and I wrote ...
1
vote
0answers
69 views

“RESTful” node.js server using express

I have attempted to construct a simple RESTful node server that allows for user authentication using passport and jwt: ...
1
vote
0answers
28 views

Site Registration Code causing multiple accounts to be registered [closed]

I have an app that uses the MEAN stack, recently I have seen a little strange behaviour. Now this doesn't happen every time a user registers, so far it has happened 3 times. When a user registers the ...
2
votes
0answers
72 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 ...
-1
votes
0answers
24 views

MySQL security in node.js client/server [closed]

This is a little project I've been working on for a while, as I learn javascript, I believe I've got it to a good first version, but would like an opinion from someone who knows javascript more. ...
3
votes
1answer
53 views

Input-reading library for Node.JS

Recently I have been busy with nodejs and I thought to create something like this Java input library, so I started with some rough code like below: ...
-1
votes
0answers
12 views

Small npm module for winston logging with bookshelfjs [closed]

This is the 1st module I've ever made, it's a custom transport for winston (sorry not enough rep to link). I'm sure I annihilated some best practices, so please let me know how I can improve it. ...
3
votes
1answer
74 views
3
votes
0answers
42 views

Check the latest internet connection speed

On the journey of learning software design I am now taking a slightly different approach and thinking to focus on some real world projects. After code reviews I would be publishing them to the ...
1
vote
1answer
44 views

Using a map of shared_ptr instead of single pointers as class members

I'm working on a node.js bindings for libcurl. As libcurl accepts many callback functions as options (like CURLOPT_READFUNCTION for example), I had to store their respective javascript callbacks ...
0
votes
1answer
24 views

Node.js register function

...
1
vote
0answers
23 views

File upload with Node streams

I'm implementing a file upload using NodeJS. I've got fully functional code, however, it feels overly complicated and I'm hoping there would be an easier way to implement the same thing? In ...
0
votes
1answer
25 views

How to flatten multiple nested node readline questions?

Say I'm creating a simple CLI. I want to use native node readline module to take in some input from user at prompt. I thought of this : ...
1
vote
1answer
27 views

Node.js put records to Kinesis with infinite retry strategy.

My application is really easy. It's going to add 500 records at a time to AWS Kinesis and if there's an error occur I'll just add that back to the queue and it's going to be retry. It's going well but ...
2
votes
1answer
56 views

A quiz game that can save data and ask trivia questions

This game has a few basic functions: ask users trivia questions based on user input, add or substract points. save game data when user inputs save. allow old user to log in and play the same old ...
-1
votes
1answer
35 views

Synchronous loop with internal asynchronous calls

Below I've written a simple version of what I'm attempting to accomplish. I'm new to asynchronous functions, so it's difficult to wrap my head around this. My goal is to wait for the loop to finish ...
-2
votes
0answers
36 views

WebRTC video chat application

I have written a basic video chat application in WebRTC. The source code is [here]]1. So far so good. I am able to stream video but would like it if the code was better. I am using setTimeout to wait ...
2
votes
0answers
44 views

Selenium WebDriver test for Slack

I submitted this script as part of a interview process. It was rejected and no reasons were given. I'm wondering what parts of my script were unacceptable. The script works, and satisfies the question,...
2
votes
0answers
14 views

Node.JS TCP Server Noob here

I just got in to Node.JS and am loving it but I am wondering if I am learning it the right way or using it right cause I don't want to learn it the wrong way then I'll have to relearn it so am ...
2
votes
1answer
117 views

Retrieving the lotto numbers - Node.js

I'm looking for feedback as to how I've structured the async calls, and If anything should be written differently. endpoints.js ...
1
vote
1answer
32 views

Using JavaScript-bitwise AND and -bitwise NOT for setting a number to 0

Obviously is the XOR-operator is used in low-level programming-languages used a lot for setting a value back to all bits 0. For example: 11010 ^ 11010 => 00000 Brought my teacher to figuring a out ...
1
vote
0answers
16 views

Matching a current user's “liked / followed” items with results from a search query

This is pretty ugly now. My main objective is to perform a search query, which I do via mongoosastic / elastic search (the search paginates 12 items at time). Then, I want to match those results with ...
3
votes
0answers
163 views

Jarvis the discord.js chat bot

Just finished creating my first bot using Discord.js for the chat application, Discord. This is my first bot and first javascript program I have ever created. I'm mainly interested in ways I can ...
10
votes
1answer
98 views

A Makefile to make some Cheese

Excuse the pun in the title, the project this is for is called "Cheddar" (a type of cheese). Github I have recently been writing a language, in which I was using grunt. Grunt was very slow for me, ...
1
vote
0answers
48 views

Basic Express + NodeJS REST API

I've created a REST API Endpoint for my website's Dashboard. ...
1
vote
1answer
57 views

Math expression parser in JavaScript

I've written the second iteration of my math expression parser, utilising what I learned from the first attempt to make a more reliable, maintainable piece of code. If anybody wants to see the first ...
0
votes
0answers
40 views

Generating a random ObjectID

We want to ensure that certain documents in our DB get distributed well across the shards. Currently the documents are sharded by their _id, but they are often ...
2
votes
1answer
23 views

An interesting use of the reduce function to convert tab-delimited data into JSON

I am learning functional programming in JavaScript. This is some code from a video tutorial by funfunfunction. I am particularly concerned about the way the existence of the customer key is checked in ...
0
votes
0answers
26 views

Javascript / Promises

I'm working on converting a simple Python script into nodejs 4.4.5 with es6 features like Promises. The original Python script did the following: Contact a 3rd party SOAP service Attempt to ...
1
vote
0answers
17 views

Express middleware to handle errors and send them to Raygun

I signed up for Raygun on Heroku and wrote a middleware in Express to handle the error, however, I am afraid this might block a request from coming through or executing all the way. This article is ...
0
votes
1answer
21 views

Node function to walk through file system and make sure it has a matching db record

I have an app that uses the file system a lot to store generated files (zip files and scss/css fil). When a user generates a file, the metadata and other information is stored in the db for later ...
0
votes
0answers
19 views

Promisify NodeJS and Mongose callback even further

I've recently started to experience writing Node.js code, and JavaScript in general. Right now I am planning to promisify (with Q) some of the node.js callback code I had, and I come to this. The ...
0
votes
0answers
54 views

Register a node-client code through an API call efficiently?

I've got a node_module that reads ArcValues for a user and updates the config of the node client at user's local (root). Like so: ...
0
votes
0answers
23 views

Retrieve YouTube user's subscriptions and store them in database

I've written this small algorithm and I'm not really proud of it. ...
5
votes
3answers
181 views

Parse a CSV file and return an object or array

I recently published a JavaScript module for NPM which is also available on Github by the name of rawiki-parse-csv. The code takes raw CSV data and returns an array. The method has one option to ...
6
votes
1answer
73 views

Counting newlines in a file

I've started to go through Node tutorials on nodeschool.io, and the second assignment was to write a program that will count the number of newlines in a file and print it out. My solution looks like ...
2
votes
1answer
43 views

Stranded messaging Angular web app - main template for all views to live within

I'm making an Angular web app to solve a pain with traditional messaging my friend and I had, of sending batches of messages (on multiple different topics) to each other every few hours and not having ...
4
votes
0answers
71 views

Electron Application with JavaScript Backdoor and Ruby Command-Line Listener

I have created an Electron Application with a JavaScript/NodeJS Backdoor and a Ruby command-line listener. I created this program for remote administration of my home computer securely using a new ...
1
vote
0answers
29 views

Directory listing in Node.JS

This solution works, and I like having all the logic after the return. The main purpose of this function was for use with other functions to return a file list: ...
1
vote
0answers
52 views

Mongoose schema for products and social media posts

Here is my current Schema Brand: ...
0
votes
0answers
15 views

Handling callbacks and errors Nodejs

I wrote a script for reading a csv, parsing it and saving data to mongodb. I would love some input on how I'm handling errors and dealing with callbacks. I wrote it with nested without using async and ...
1
vote
1answer
16 views

Optionally creating a directory path based based on existence in NodeJS

I've been doing some reading and tutorials. As such I've contrived a node based project to apply what I've learned. I thought this was a good example as it had some conditional async calls and error ...
1
vote
0answers
22 views

es6 OOP class Email + Facebook login

I've been given the task to create a micro-service which basically logs in OR creates a user. I chose to do this with express.js ...
1
vote
1answer
43 views

Support multi functionality in server.js

i've node app that having the main function server.js(entry point) Following is the server.js file code ...
1
vote
0answers
41 views

Dynamically call a function in a given module

I use the following code that is working as expected and I want to get some feedback from the community how I can Improve it... The code does the following: Get Some request with specific ...
2
votes
0answers
24 views

Wrapping a node.js module

I need to use elasticseach in my node.js project, whose API looks like the following: ...
0
votes
0answers
24 views

Merging JSON objects

I have 2 JSON structures. Input: ...