Saturday 30 September 2017

I just wrote a benchmark utility that measures memory use, CPU time, and duration of scripts

http://ift.tt/2fZMfQT

Submitted October 01, 2017 at 03:43AM by holloway

Mocha testing problem

Help me out, I have a test that seems to return an error but, the condition for the test passes. What am I missing?it('Should not be able to login if not registered', function(done) { chai.request('localhost:3000') .post('/login') .type('form') .send({ username: "wrongusername", password: "wrongpassword" }) .end(function(err, res) { if (err) return done(err); // Seems to error here? res.status.should.be.equal(401); // status is 401 done(); }); }); Here is the error shown in the console:1) Auth Test: Should not be able to login if not registered: Error: Unauthorized

Submitted October 01, 2017 at 04:12AM by soggybag

Issac Schlueter (NPM) has officially lost his shit.

http://ift.tt/2fZv026

Submitted October 01, 2017 at 12:59AM by Fatema_Spanky

I Created a small library made for random tests (monkey, fuzz, ect..) in mind.

http://ift.tt/2xSKvCH

Submitted September 30, 2017 at 08:29PM by Tenac23

ELI5 what is a package manager?

I come from a background of PHP and MySQL and am having a hard time understanding what a package is and what does a package manager like npm do.

Submitted September 30, 2017 at 06:06PM by alienfromjupiter007

Realtime Libraries for Node

http://ift.tt/2fZfcw1

Submitted September 30, 2017 at 05:00PM by justinucd

Writing commands in cmd while node server is running.

Hello, I've recently been trying to learn how to use node, from a unity c# background. And i have been wondering is it possible to run commands in command prompt, while node server is running? And also with theese commands to invoke functions in the server? Thanks!

Submitted September 30, 2017 at 01:31PM by LumpySpoon

Captcha recognition way? (jpeg captcha image)

I am in searching captcha parser, solver, recognition lib for node.js maybe using another language , maybe pythong, golang or any... Do anybody know any way to solve jpg captchas?

Submitted September 30, 2017 at 10:19AM by Rubinsta

A weather CLI on Node.js

http://ift.tt/2hxW6ki

Submitted September 30, 2017 at 08:53AM by ismaelgt

Best path to learn Node JS

http://ift.tt/2xNaOda

Submitted September 30, 2017 at 08:02AM by andersondavid2

Friday 29 September 2017

A fun puzzle that had me stumped. Details in comment.

http://ift.tt/2xEJH4E

Submitted September 30, 2017 at 04:17AM by umib0zu

How best to model Reddit with Mongo?

I'm trying to solve the problem of nested comments to create a reddit clone with node and Mongo. This is more experiment than production project.How best to structure the mongo database?

Submitted September 30, 2017 at 02:31AM by soggybag

User authentication before email verification

I think my question isn't very node-specific, but because I am using node/express, I am posting the question here :) Currently I have a system where user can freely sign up without verification. I assumed that this system can be abused so I thought of implementing an email verification where I would be using nodemailer, or something similar to send a verification code and once the user enters in the correct code, the user is fully authenticated and can write comments and create posts. However, I am not sure where and how to store pre-authenticated users. They won't be able to comment or write a post, but when they attempt to log in, they will be directed to a page to verify the account with the email.should I utilize localstorage? I can't figure out what to store.Is there any other way to make sign up secure that a bot cannot abuse and cannot store trash into my database?Thanks!

Submitted September 29, 2017 at 09:31PM by some_coreano

XML to XML Mapping using XPATH

I have a big xml to xml mapping (almost 5000 lines in each XML having diff xsd). Is there is library/tool that takes the set of Xpath as input and populate the finalize xml. its kind of mapping but with custom rules and business logic associated with it.

Submitted September 29, 2017 at 08:34PM by panbhatt

Help with swig and passing variable into file then calling it

I have read through the swig documentation to figure out how to use it, so far no luck. I am trying to take this:// dashboard test app.get('/dashboard/test', setRender('dashboard/test'), setRedirect({auth:'/'}), isAuthenticated, dashboard.getDefault); Then input assets tracked. I am not sure the best way to do this with swig. Hopefully that is even close to right. I need to know how to put into my route handler the data then call it back in my template file.

Submitted September 29, 2017 at 07:02PM by business_for_life

Is there a way have login to an app on a local network that doesn't suck?

Say you have an express/react or similar app. It's use is on local networks -it will listen on, for example, 192.168.5.6So, to get https, you need to give it a real FQDN and deal with certs, so it can have a cert and not show everyone "this page is INSECURE!!" messages in their browser.Or you can not use https and send all your login/cookies in the plain text (on your local network yes, but still)Any 3rd option in 2017?

Submitted September 29, 2017 at 07:20PM by zQpNB

Node.js Security Release Summary - September 2017

http://ift.tt/2hzSONB

Submitted September 29, 2017 at 05:41PM by _bit

RisingStack cofounder to join GoDaddy

http://ift.tt/2fWgGY8

Submitted September 29, 2017 at 02:51PM by ecares

Using Husky, Git-hooks, and Linting to protect everyone from everyone else and yourself

http://ift.tt/2xNf4K6

Submitted September 29, 2017 at 02:15PM by justintimecoder

Node8’s util.promisify is freakin’ awesome!

http://ift.tt/2xMKosb

Submitted September 29, 2017 at 10:59AM by codedesi

How does GitHub automatically make the GitHub pages domain? And what’s the best way, it at all, to implement in Node/Express?

No text found

Submitted September 29, 2017 at 11:07AM by AlexLex1500

Node.js Weekly Update - September 29

http://ift.tt/2yL8b9T

Submitted September 29, 2017 at 10:47AM by hfeeri

a modern and intuitive terminal-based text editor

http://ift.tt/2oG2eow

Submitted September 29, 2017 at 10:51AM by ratancs

Question about sending data to the Server.

I'm making a register and login with Database integration.My debate is whether to use Socket.io/WebSockets or use a Post app to send information to the Server? I'm mostly concerned about security and the fastest way to send that data.Thanks in advance.

Submitted September 29, 2017 at 05:30AM by CavariuX

Thursday 28 September 2017

Not including res.send(200)

I've been thaught that you need to have res.send(200) if a call is succesfull in your API method, or else any client will receive a timeout exception.But some of my api methods do not include res.send(200), and it works fine(I didn't get a timeout exception). Eg:router.post("/insertTestData", function(req, res){ console.log("Hello"); let sql = `INSERT INTO airbnb.testing(name) VALUES(?)`; let values = [req.body.name]; app.con.query(sql, values, function (err, result) { console.log(result); }); });

Submitted September 29, 2017 at 01:48AM by badboyzpwns

How do you use nodejs to transfer a file via SCP that requires RSA Authentication?

Hey guys, sorry for the very basic question here.I have an AWS instance, and I'd like my program to automatically upload files to the server via SCP. I have the hostname string, the username and password. I also have the RSA authentication key in a PEM file.I looked at both the SCP and SCP2 modules but I couldn't figure out how to do RSA authentication with those packages.How is this to be done? Thanks in advance!!

Submitted September 28, 2017 at 10:51PM by thenewstampede

[Help] Getting app to run on AWS elasticbeanstalk (502 Bad Gateway)

Hi this is my first time trying to run a nodejs app at all so I am having trouble troubleshooting.my package.json file contains "scripts": { "start": "lite-server" }, "dependencies": { "lite-server": "2.3.0" } }AWS says app starts, but then I get 502 bad gateway. Sources online say that AWS doesn't always start correctly, so I have tried to configure it to start using the "start" command as it is in my json file. I have read that the start command is a common error and unless you tell Amazon explicitly what to use it will falsely say the app has started. I have also read that ports need to match but do not have port information in my app (script.js) file.Please help a noob!

Submitted September 28, 2017 at 11:24PM by buqratis

Need some direction as I get started learning node.

Total node newbie here. Could someone give me some direction or point me towards a tutorial on how I can get a normal frontend jquery/fabric/canvas library running server side on node?I have a client site that uses http://ift.tt/1Eoe8Ui and during saving of customized products we generate an image from the canvas to use in other parts of the system like emails, invoices, and whatnot. The issue is since the image is generated client side we have to have the client upload it, which obviously can be super slow.I would instead just like to save the customized product as json and have the client upload that to node. Which can then use the same jquery lib to render the image server side and save it to disk. Is something like this possible/easy with node?

Submitted September 28, 2017 at 10:36PM by total-node-newbie

Node Interactive Ticket for Sale Cheap!

All,Regrettably going to miss Node Interactive in Vancouver. If youve been eyeballing it and want to go cheaply I bought this early bird ticket for $250 originally.lmk... it can be transferred to you.

Submitted September 28, 2017 at 09:01PM by kreig303

How do you guys debug on Heroku?

I'm working on a GroupMe bot and I currently have it deployed on Heroku. For those of you who have done similar projects, how do you debug with heroku? I could try to run my project locally but I have it configured where GroupMe sends a POST to my Heroku app any time a message is sent. I would rather debug on Heroku and not have to set up a local server for Groupme to send the post. Any help is greatly appreciated, I'm sure I'm just being an idiot.

Submitted September 28, 2017 at 06:23PM by satchmoto

Tutorial - Learn by example building & deploying real-world Node.js applications from absolute scratch

http://ift.tt/2k5uS5x

Submitted September 28, 2017 at 05:51PM by penialman

Which is better Node js or PHP for multi-player poker game?

Before answering please go through the requirements: 1 . I am creating the multi-player poker game. 2. Here security is the main concern. 3. I know both languages in very basic. ( I will learn in more deeper as requirement comes) .Or I can use anyone ?

Submitted September 28, 2017 at 04:54PM by Ankur_3

How Massive Companies Use Node.js at Scale

http://ift.tt/2xELQLm

Submitted September 28, 2017 at 04:08PM by _bit

project-version - Get the current version of your project. 👀

http://ift.tt/2wY825J

Submitted September 28, 2017 at 02:03PM by simonepri

Node.js pausing/locking under load?

I have a bit of a weird problem which happens when testing a Node.js application deployed inside a Docker container, into AWS when while load testing it using Gatling (load testing suite) it decides after a short period of time at high load to stop servicing any requests and looks like it's 'freezing'.This doesn't happen when testing locally.So far I've triedlooking for all blocking code and trying to develop my way out of the problem by re-engineering things. Found a load of things I've improved but no 'ahaa' moments.Using V8 tick logs to identify how much time the CPU spends doing various things. No smoking guns found.Using heap dumps to look at memory leaks and object usage. Nothing obvious there.Looking at garbage collection logs and output to look for large garbage collection timings. No luck.These pauses look like they take 2000-3000 milliseconds to complete by which time our server healthchecks think that the underlying application is not working and removes it from a load balancer. The healthchecks just try a /healthcheck router path on the Express application and ensure there is a response.So - without knowing 'what' is causing the problem, are there any other ways to at least identify why the Node process might be in an idle/paused state and not doing anything?It's weird how it can take massive amounts of load in a local environment, but for non obvious reasons in a deployed environment acts differently, and does not identify why. Obviously there are ram/cpu/resource differences but I'd like to at least have Node.js tell me for what reason it's decided to give up the ghost temporarily.

Submitted September 28, 2017 at 09:33AM by voxcast

Path validation vulnerability, September 2017

http://ift.tt/2yHH27J

Submitted September 27, 2017 at 07:51PM by dwaxe

Weird error when responding to form submission vs ajax

I have a form
// inputs
It successful returns results from database query.// server app.post('/login', function(req, resp) { // database query console.log(result); }) However, in my javascript, if I do an ajax call, console log return undefined. Is there some sort of conflict when having a form with the same action as an ajax url?

Submitted September 28, 2017 at 05:46AM by eggtart_prince

node.js vs. golang, can those of you working professionally in the field give me your opinion?

The political messes of the last number of weeks has seen some mentioning Go as a way to escape to a "saner" development platform. I, as a student, am still forging my way into the industry but I still have the freedom to choose a path on the hobby side as well as course choices in my curriculum.I don't like a lot of what I have seen on twitter, etc. from some of the top people in node.js, but I have really enjoyed my school studies with node and was beginning some side projects all enthusiastic to see what I could achieve with the MEAN stack. But now you have got me wondering about golang, and whether I should just make the jump now, at this early stage of my career.So I guess my question, for someone still in college, with full freedom of choice what platforms to try to master and specialize in, what considerations do you see that should lead me more in the nodejs direction or vice versa in the golang direction.Thank you very much for a great community here and opportunity to learn and discuss. I hope my question is not too naive and something I should be able to research myself, but I didn't think it would hurt to get some opinions from people that are actually out in the business world already.

Submitted September 28, 2017 at 07:36AM by pikachani

Wednesday 27 September 2017

Node8’s util.promisify is so freakin’ awesome!

http://ift.tt/2y9gGib

Submitted September 28, 2017 at 12:15AM by VeryOldFilms

How to make asynchronous http requests in node.js?

I'm beginning to write my first node.js endpoint and part of the task is to make a POST request to multiple APIs.

Submitted September 27, 2017 at 06:08PM by prove_it_with_math

Is it time to replace REST with RPC?

http://ift.tt/2k32O2L

Submitted September 27, 2017 at 05:42PM by nucleocide

Introducing eXtern OS

Hi,Ok, so during my spare time, I have been working on an Operating System project called eXtern OS. I just made the first beta of it available for download today! To get the technicalities out of the way, it is based on Linux and it is a Node Js powered OS (i.e uses Nw.js currently to run Apps, hence why I thought some of you might be interested!). This beta release is mainly to get an idea of whether people like the idea of this OS. If so, then I/we can work on releasing more betas till a stable release. Ofcause there is a lot that can be done differently, there is a lot that still needs to be done, but I gave myself a deadline to release this beta, just so that you can have an idea of what the final product will be like if enough people are interested.Here is the demo video for eXtern OS: https://youtu.be/-5tak0tHqIg.You can now go and download it from the eXtern OS website: https://externos.ioI would like to hear from you! Ofcause this reddit post won't be open for long, so you can always let me know through my twitter: https://twitter.com/AnesuChiodze or here on reddit ofcause! Enjoy!Anesu

Submitted September 27, 2017 at 05:59PM by anesuc

Is the ecosystem at risk?

Hi there. I want to know if the current drama puts the Node ecosystem at risk. We use Node at work for very important build tasks. If "Isaacs" wanted to wipe the npm directory clean, would he be able to? He seems like a bit of a psychopath and I am honestly concerned. If the answer is yes, I will be forced to use another language.Thanks.

Submitted September 27, 2017 at 06:01PM by _unst4bl3

Managing Connections with the MongoDB Node.js Driver

http://ift.tt/2k2Uvnq

Submitted September 27, 2017 at 04:04PM by code_barbarian

Question on the implementation of Google-Auth (Code inside)

I'm currently working on REST API and implementing Authentication using JWT and OAuth for google/Facebook, I managed to get google auth to login and save token in the db my issue is, how to send the token in json response and test it using postman this is example of user route:app.route('/user') .all(app.auth.authenticate()) .get(UserController.findUser) and here my login import jwt from 'jwt-simple'module.exports = app => { const cfg = app.libs.config const Users = app.db.models.Users app.post('/login', (req, res) => { if (req.body.email && req.body.password) { const email = req.body.email const password = req.body.password Users.findOne({where: {email: email}}) .then(user => { if (Users.isPassword(user.password, password)) { const payload = {id: user.id} res.json({ token: jwt.encode(payload, cfg.jwtSecret) }) } else { res.sendStatus(401) } }) .catch(error => res.sendStatus(401)) } else { res.sendStatus(401) } }) app.post('/register', (req, res) => { Users.create(req.body) .then(result => res.json(result)) .catch(error => { res.status(412).json({msg: error.message}) }) }) app.get('/login/google', app.auth.googleAskForPermission()) app.get('/login/google/callback', app.auth.googleAuthenticate()) app.get('/login/google/success', (req, res) => { if (req.user) { res.send(req.user) } else { res.send(401) } }) } and my Auth.jsimport passport from 'passport' import { Strategy, ExtractJwt } from 'passport-jwt' import { OAuth2Strategy as GoogleStrategy } from 'passport-google-oauth' module.exports = app => { const Users = app.db.models.Users const cfg = app.libs.config const params = { secretOrKey: cfg.jwtSecret, jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken() } const strategy = new Strategy(params, (payload, done) => { Users.findById(payload.id) .then(user => { if (user) { return done(null, { id: user.id, email: user.email }) } return done(null, false) }) .catch(error => done(error, null)) }) passport.use(strategy) const googleStrategy = new GoogleStrategy({ clientID: process.env.GOOGLE_AUTH_ID, clientSecret: process.env.GOOGLE_AUTH_SECRET, callbackURL: 'http://localhost:3000/login/google/callback' }, (token, refreshToken, profile, done) => { Users.find({where: {'google.id': profile.id}}) .then(user => { if (user) { return done(null, { id: user.id, email: user.email }) } else { let newUser = { email: profile.emails[0].value, firstName: profile.name.givenName, lastName: profile.name.familyName, password: 'password', google: { id: profile.id, token: token, name: profile.name, email: profile.emails[0].value } } Users.create(newUser) .then(result => done(null, newUser)) } }) }) passport.use(googleStrategy) return { initialize: () => { return passport.initialize() }, authenticate: () => { return passport.authenticate('jwt', cfg.jwtSession) }, googleAskForPermission: () => { return passport.authenticate('google', {scope: ['profile', 'email']}) }, googleAuthenticate: () => { return passport.authenticate('google', {successRedirect: '/login/google/success', session: false}) } } } the problem is req.user is empty during successRedirect, I tried to google the answer but all examples were using express session to serialize the user while I'm trying to use api for mobile app. how to send the google auth token in json response and test it using postman

Submitted September 27, 2017 at 04:06PM by supermedo

Have a tech interview for a jr developer role, best ways to prepare?

Hey guys, I have a tech interview next week for a jr developer role in node and express (and react). Any idea of what they might ask? Its an hour long interview but they didn't give me any hints other than bring a laptop

Submitted September 27, 2017 at 04:08PM by Prot00ls

How can I set up client access to my MongoDB Database?

I am running on Windows and have:Run mongod in a terminalUsed a python script and pymongo to write information to this database.What I am trying to do is set up a website, using html, javascript and node.js, to access the data in the database. I understand this is a "client" then as opposed to a "server". Everything I've found online about this has been extremely unhelpful.I just want to get the data that I put in the database into the javascript file for the website.Could anyone please help me with how to do this? Thanks

Submitted September 27, 2017 at 04:39PM by julywildcat

The Mods are asleep! Upvote this picture of Rasmus Lerdorf, who will save us from NodeJS's toxic politics!

http://ift.tt/2hwsp3i

Submitted September 27, 2017 at 04:30PM by RussianGuyovichMAGA

We, the Nodejs community, can get past this.

https://twitter.com/MylesBorins/status/912808397686345728

Submitted September 27, 2017 at 03:06PM by ecares

Learn JavaScript Promises by Building a Promise from Scratch

http://ift.tt/2xD9ZDn

Submitted September 27, 2017 at 02:52PM by treyhuffine

Terminal Kit: A full-blown terminal lib for Node.js

http://ift.tt/2kjsPq7

Submitted September 27, 2017 at 02:31PM by lau2222

Need help with NodeJS and Handlebars

Good day Reddit-readers For about 1-2 days I've been looking for a solution to a problem i approached...i want to see only people in a list with the same name as the person that is logged in. For example you login with "Alex" Then i'd like to see every user with the name "Alex" in a list in Handlebars /****THIS IS THE ROUTER TO THE OVERVIEW*******/ router.get('/overview', loggedIn, function (req, res, next) { var resultArray = []; mongo.connect(url, function (err, db) { assert.equal(null, err); var cursor = db.collection('users').find(); cursor.forEach(function (doc, err) { assert.equal(null, err); resultArray.push(doc); }, function () { db.close(); res.render('overview', {users: resultArray}); }); }); With this i can see all users and in handlebars i have /*type 1 means he has the permission to see this if his type is 1*/

Unauthorized!

I was thinking about something like So it would show me every user with the same name...

Submitted September 27, 2017 at 12:55PM by Paindeva

State of Open Source Security survey

The people at Snyk have a survey where they're trying to create a snapshot of the state of open-source security for the entire community to dig into.http://ift.tt/2wBHTJT(Snyk checks your node modules for any known security vulnerabilities)

Submitted September 27, 2017 at 10:34AM by Parasomnopolis

Tech CEO Isaac Schlueter Calls For Fewer White Men In Tech

http://ift.tt/2yCVhdZ

Submitted September 27, 2017 at 08:31AM by LuciSattan

Build chat with Node.js Clusters and Websockets

http://ift.tt/2wTqdd5

Submitted September 27, 2017 at 04:41AM by goriunovd

Single login website, multiple services

Hey guys,I'm planning to implement some sort of website (e.g. login.site.com) which can login to a service of choice (e.g. login.site.com > service1.site.com or service2.site.com).I'm trying to get this sort of flow going:Go to service1.site.comRedirected (or a pop-up like Google sign-in) to login.site.comAuthenticate on that siteRedirected, logged in, to service1.site.comThe same flow can be applied to any number of other services should we decide to create a new one.Does anyone have experience in doing this, or probably link to an appropriate guide to go about doing this? I'm trying to figure out:What authentication method should I actually useHow should it be writtenSecurity issues I should considerMajority of the projects I have been working on are in Express and Node 8+ if it helps.

Submitted September 27, 2017 at 07:41AM by cruzcontrol56

Tuesday 26 September 2017

console.dir(this, {colors: true}) gives you colors in the terminal

https://twitter.com/umaar/status/912630316338225152

Submitted September 26, 2017 at 08:44PM by kahwee

Best NodeUp podcast episodes?

Trying to get into podcasts and thought the NodeUp podcast would be a good first step. Looks like there is over 100 episodes, so I wanted to see if there were any recommended episodes to listen to? Thanks!

Submitted September 27, 2017 at 01:40AM by SepticReVo

A suggestion for the mods

This sub has been fucking unbearable for the last couple of days. Code is something I do, in part, to get away from all this toxic political bullshit. And seeing users bring their political baggage into this subreddit, be it through posts and/or comments, makes me sick.We need a zero-tolerance policy. Any post involving community drama and/or politics should be IMMEDIATELY deleted and locked. Any posts that are political in nature should be deleted. Period.If you use the terms "antifa", "alt-right", "SJW", "Nazi", or any other bullshit political term in a post, it should be deleted.Mods, if you are reading this, please enforce this policy.

Submitted September 27, 2017 at 12:15AM by T-Dot1992

Node v8.6.0 (Current)

http://ift.tt/2xvG3tL

Submitted September 26, 2017 at 11:51PM by dwaxe

Getting disconnected ws (websocket) port

I'm not usually a node.js developer but I've inheritted a code base encountering an issue. After two days of debugging I was hoping a kind soul could spare a few moments. I have a server that keeps a list of IP+ports to determine connected clients. When a disconnect happens it is now unable to gather which port that message is coming from. I believe if I can get the port that was disconnected that will fix my issue.IP&Port are gotten on connection (wss.on('connection',...) via ws._socket.remoteAddress + ':' + ws._socket.remotePort;IP&Port are gotten during disconnect (ws.on('close',)...) via ws._socket._peername.address + ':' + ws._socket._peername.port;When the ws.on('close' even occurs however ws._socket is null. This code used to function, through update or who knows what it no longer does. I've been digging through quickstarts and API docs looking for instances of usage with ws._socket._peername.port and mostly what I find is very little, a few people suggesting it and no complaints.If I remove this functionality, and don't try to delete clients from the client list, I get 'Error: not opened at WebSocket.send' errors which the Internet tells me is likely due to poor client cleanupIf I try to use just the IP instead of an IP+port combo I get the above error as well.pastebin of clientHandler.jspastebin of server.jsAny help is muchappreciated as I'm sort of at the end of my debugging capabilities for Node.js since I haven't really had much to do with it up till this point. The purpose of the server is to serve numbers to web pages which are served up via apache.

Submitted September 26, 2017 at 11:42PM by anonmarmot

Emulate Devices and Take Webpage Screenshots with Headless Chrome and Node.js

http://ift.tt/2fPCg0n

Submitted September 26, 2017 at 09:54PM by Fady-Mak

Company Changing Tech. NodeJs as a backend?

Hi WebDev I was wondering if anyone could offer me some advice. My current company is about to make a shift in technology. We currently have a C# backend. The team are deciding which technology to move to. The company primarily deal with currency exchange and are hoping to move towards payments. We are most probably moving towards Heroku and will have integration with Salesforce with a Vue.js frontend. I have a little experience in NodeJs and hope to shift the conversation towards this. Other developers are suggesting Java and say that Node will break under CPU intensive situations. I wouldn't have thought much of the code we produce would do this. I have heard the many benefits of NodeJs, if this is a good tech to head towards do you have any arguments I can use in favour of it?

Submitted September 26, 2017 at 09:57PM by morkett

Proposal for BigInt in JavaScript

http://ift.tt/2pfydQ8

Submitted September 26, 2017 at 08:40PM by kahwee

Packaging linux dep with Node app

I'm having an issue pushing a Node app to CloudFoundry ( very similar to Heroku)I have a node dependency (http://ift.tt/2aMWJxi) that requires a system level package to be installed (cyrus-sasl-devel)If I had system level access, I could just install the dep with sudo apt-get install. But I don't. Is there anyway I can bundle that dep with my node app? Either bundle the whole thing as a binary, or somehow point to the missing binary locally?

Submitted September 26, 2017 at 07:17PM by bcoop713

Problem: Same Api endpoint different authorization levels

Hi, I've been stuck on this problem for a while. API endpoints (the same api endpoints) should have different authorization level depending on what resource the user is trying to access (different parameters).One customer doesn’t want any form of login or user registration, so I can’t do a "joint accessRights table" (MariaDB) between the resource and a user, because in some cases there are no logged in user.I can’t do a sharp distinction on customers either, because the same customer might want different authorization levels on different types of products that they are supplying.The "best” solution I've thought of is to add an attribute to all affected tables that tells what the autorizationLevel that specific resource require, but it feels messy, even more so when I start think on how to implement this code wise.Is there anyone that have implemented something similar before, knows about a good article or programming pattern that I can use to solve this?

Submitted September 26, 2017 at 07:18PM by Archheretic

npm config set prefix: “the syntax of the command is incorrect”

Groa.js - Expressive gRPC middleware framework for Node.js

http://ift.tt/2hqh6tu

Submitted September 26, 2017 at 08:04PM by cfsghost

API Authentication with Node | #11 - Google OAuth

https://youtu.be/JgSLf-HS5gg

Submitted September 26, 2017 at 06:14PM by eXtremeRR

ES6 Promises: Patterns and Anti-Patterns

http://ift.tt/2fltKp1

Submitted September 26, 2017 at 05:21PM by part_timepunk

StackImpact – Node.js Production Profiler: CPU hot spots, Memory allocations, Async calls

http://ift.tt/2yqwpWi

Submitted September 26, 2017 at 04:44PM by l0g1cs

Slack JS updated: 7kb and now supports promises

http://ift.tt/2hw4QDQ

Submitted September 26, 2017 at 03:55PM by brianleroux

Last Week in Node.js Working Groups - September 18th

http://ift.tt/2hwJRRt

Submitted September 26, 2017 at 03:39PM by _bit

Hey Node friends, can we stop posting about politics and start posting about code again?

It would really warm my cold dead heart if we could ignore the stuff that's happening over on Twitter and such, and let the whole thing just die off.The opinions of a few people aren't so important as to rustle our jimmies, plus I love reading about code a lot more than I love reading about politics.Thanks Node friends, let's make this place friendlier for each other.

Submitted September 26, 2017 at 03:58PM by venoma333

Trying to download a file with express from the server as client - Same error over and over

Hello,currently I am always running in the same error and I do not find any solution. I am trying to download a file from the server as a client with express.This is the code serverside:// Set up var nodemailer = require('nodemailer'); var express = require('express'); var multer = require('multer'); var app = express(); var mongoose = require('mongoose'); var morgan = require('morgan'); var bodyParser = require('body-parser'); var methodOverride = require('method-override'); var cors = require('cors'); var fs = require('fs'); var path = require('path'); var mkdirp = require('mkdirp'); mongoose.connect('mongodb://localhost:27017/Sharify'); app.use(morgan('dev')); app.use(bodyParser.urlencoded({ 'extended': 'true' })); app.use(bodyParser.json()); app.use(bodyParser.json({ type: 'application/vnd.api+json' })); app.use(methodOverride()); app.use(cors()); app.use(function (req, res, next) { res.header("Access-Control-Allow-Origin", "*"); res.header('Access-Control-Allow-Methods', 'DELETE, PUT, GET'); res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); next(); }); app.get('/api/download/:projectid/:filename', function (req, res) { res.download(__dirname + '/uploads/' + req.params.projectid + '/' + req.params.filename); }); Clientside it is getting called by this:downloadFile(file) { return new Promise(resolve => { this.http.get('http://localhost:27017/api/download/' + file.projectID + "/" + file.fileName) .map(res => res.json()) .subscribe(data => { resolve(this.data); }); }); } I always get this error in the developer console: http://ift.tt/2fwwwvy someone know a solution for that? Thanks in advance!

Submitted September 26, 2017 at 02:05PM by sander5891

Top 5 Tools You Should Use For Node.js Development

http://ift.tt/2yDLC6Z

Submitted September 26, 2017 at 01:35PM by raygain123

NPM CEO makes multiple Twitter posts condoning violence, claims bigots cannot be "convinced" without its use

http://ift.tt/2wQyXvv

Submitted September 26, 2017 at 01:26PM by banned_main_

NPM CEO wants to murder bigotry away: "A common objection is that we should try to convince Nazis to not be Nazis. I agree. We convince them by killing Nazis." Time to report a CoC violation and find a new CEO?

http://ift.tt/2wQyXvv

Submitted September 26, 2017 at 12:48PM by banned_main_

Keep Express only within the web layer

http://ift.tt/2yDI30P

Submitted September 26, 2017 at 12:13PM by yonatannn

About that hash flooding vulnerability in Node.js…

http://ift.tt/2ibN6l0

Submitted September 26, 2017 at 10:43AM by fagnerbrack

Help Wanted: Accessing gmail from NodeJS

Hello.I have a Node app running that regularly checks a given gmail account and does things based on the email contents. Only this app uses this email (no one logs in to this email on the browser ie).I've been using nodemailer to connect to this account using SMTP with "Allow Less Secure Apps" turned on in the gmail settings. While this has worked well for a while, we're now in the process of upping our security and as part of this the "Allow Less Secure Apps" option will have to be turned off.How do I make my app avoid the use of this option? It needs IMAP and SMTP access as it uses gmail to both check for new mails and send some from the same address.

Submitted September 26, 2017 at 09:14AM by TheColossalItch

mssql, avoid multiple connections

I'm migrating from Postgres to MSSQL for my node application. For node, I can create a connection and then do individual queries using that connection, instead of making a connection for each query.const dbURL = process.env.DATABASE_URL; const client = new pg.Client(dbURL); client.connect(); client.query( /* SQL /*, callback); Is there a similar method in mssql? I've looked through the documentations and some stackoverflow posts. So far, I've tried this.const sql = require('mssql'); var config = { // db configs }; const connection = new sql.ConnectionPool(config); // sql.Connection is not a constructor connection.connect(); var request = new sql.Request(connection); request.query( /* SQL statement */, function(err, result) { // returns undefined console.log(result); }); Do all queries have to be made inside the connect()? If so, am I opening up a connection for each query?

Submitted September 26, 2017 at 05:58AM by eggtart_prince

Top 10 Programming Languages of 2017 So Far, based on GitHub’s recent data and TIOBE Index for June 2017, Java’s Growth in 2016: 63%

http://ift.tt/2uBSBLa

Submitted September 26, 2017 at 07:19AM by 2sbro

CGI-Node: Replace PHP with JavaScript using Node.js

http://ift.tt/1vPeqPS

Submitted September 26, 2017 at 07:28AM by laggingreflex

Scaffold APIs with ExpressJS and Swagger

I just released a new version of generator-express-no-stress.The generator scaffolds a new project and includes API validation, interactive API documentation, structured logging, ES.next, and a transpilation pipeline.This version includes the mocha test framework and s a sample API testCheck it out http://ift.tt/2yDNXz6 it helps

Submitted September 26, 2017 at 04:34AM by coracarm

Mocha Unit Testing Help

Hi All, Starting to learn node and although I've been programming in various languages for a while, unit testing has never been a priority (I know, I know...).I wrote the below code as part of a challenge the other day but couldn't determine a proper way of unit testing it. Would appreciate some guidance, thanks.const mysql = require('mysql'); const Sequelize = require('sequelize'); const host = process.env.DB_HOST || '127.0.0.1'; const user = process.env.DB_USER || 'root'; const password = process.env.DB_PASSWORD || 'root'; const db = process.env.DB_DATABASE || 'test'; //Use Sequelize to create models of our database and insert the initial values const sequelize = new Sequelize(db, user, password, {host: host, dialect: 'mysql'}); const SiteData = sequelize.define('site_data', { site_id: { type: Sequelize.INTEGER, autoIncrement: true, primaryKey: true }, power: Sequelize.INTEGER, dsu_id: Sequelize.INTEGER },{ timestamps:false }); const DsuData = sequelize.define('dsu_data', { dsu_id: { type: Sequelize.INTEGER, primaryKey: true }, total_power: Sequelize.INTEGER },{ timestamps:false }); //force flag on sync function will drop the tables if they exist and then recreate them DsuData.sync({force: true}); //write initial data to SiteData model, once it is created, call insert function ona 1 second interval SiteData.sync({force: true}) .then(() => SiteData.create({ power: 234, dsu_id: 1 })) .then(() => SiteData.create({ power: 443, dsu_id: 1 })) .then(() => SiteData.create({ power: 232, dsu_id: 1 })) .then(() => SiteData.create({ power: 111, dsu_id: 2 })) .then(() => { setInterval(insert,1000); }); //Query database for all distinct dsu_id, and aggregates of their powers -select dsu_id, sum(power) as 'total' from site_data group by dsu_id; //For each row in resulting array, call upsert function const insert = () => { SiteData.findAll({ group: ['dsu_id'], attributes: ['dsu_id',[Sequelize.fn('SUM',Sequelize.col('power')),'total']] }) .then((siteDatas) => { siteDatas.forEach(function (arrayitem) { upsert({ dsu_id: arrayitem.dsu_id,total_power: arrayitem.get('total') },{dsu_id:arrayitem.dsu_id }).then(function(result){ }); }); }); }; //if row exists with matching dsu_id, update the total_power value //if it doesn't exist, insert the dsu_id and total_power function upsert(values, condition) { return DsuData .findOne({ where: condition }) .then(function(obj) { if(obj) { // update return obj.update(values); } else { // insert return DsuData.create(values); } }) }

Submitted September 26, 2017 at 08:25AM by AlphabetHat

Monday 25 September 2017

Folding Promises in JavaScript

http://ift.tt/2uLM15e

Submitted September 26, 2017 at 02:46AM by fagnerbrack

Help a new Node Js Developer with this weird issue!!!

This is the code that is testing my work:Issue is when I delete the chapter1.result.json files from folder, this program remakes the files correctly as it should, however the cmd returns undefined. But when I rerun the file on cmd after the first time and it has made all the files necessary the cmd prints everything correctly. Anyone know why this is happeneing?const fd = require("./fileData"); const tmec = require("./textMetrics"); const bluebird = require("bluebird"); const Promise = bluebird.Promise; const prompt = bluebird.promisifyAll(require("prompt")); const fs = bluebird.promisifyAll(require("fs")); async function main() { try { let check = await fd.getFileAsJSON("chapter1.result.json"); console.log(check); } catch(e) { if(e["errno"] == -4058 || undefined || null) // Checks if error is error number -4058 which says file does not exist { try { let fileText = await fd.getFileAsString("chapter1.txt"); //console.log(fileText); let simplifyText = await tmec.simplify(fileText); let dFile = await fd.saveStringToFile("chapter1.debug.txt", simplifyText); let metricRes = await fd.saveJSONToFile("chapter1.result.json", tmec.createMetrics(simplifyText)); console.log(metricRes); } catch(e) { console.error(e); } } } try { let check1 = await fd.getFileAsJSON("chapter2.result.json"); console.log(check1); } catch(e) { if(e["errno"] == -4058 || undefined || null) // Checks if error is error number -4058 which says file does not exist { try { let fileText1 = await fd.getFileAsString("chapter2.txt"); //console.log(fileText); let simplifyText1 = await tmec.simplify(fileText1); let dFile1 = await fd.saveStringToFile("chapter2.debug.txt", simplifyText1); let metricRes1 = await fd.saveJSONToFile("chapter2.result.json", tmec.createMetrics(simplifyText1)); console.log(metricRes1); } catch(e) { console.error(e); } } } try { let check2 = await fd.getFileAsJSON("chapter3.result.json"); console.log(check2); } catch(e) { if(e["errno"] == -4058 || undefined || null) // Checks if error is error number -4058 which says file does not exist { try { let fileText2 = await fd.getFileAsString("chapter3.txt"); //console.log(fileText); let simplifyText2 = await tmec.simplify(fileText2); let dFile2 = await fd.saveStringToFile("chapter3.debug.txt", simplifyText2); let metricRes2 = await fd.saveJSONToFile("chapter3.result.json", tmec.createMetrics(simplifyText2)); console.log(metricRes2); } catch(e) { console.error(e); } } } } main();

Submitted September 26, 2017 at 03:09AM by karuaan

What open source software with great testing could I explore to learn how to write better tests?

Spent the last couple days learning how to test through little tutorials and articles but few of them seem thorough enough, mostly because most of the tutorials are just testing simple dummy apps. What open source node projects with great tests can I look into to see how tests are really implemented in actual production apps?

Submitted September 26, 2017 at 12:54AM by qerardo

What is the most likely future for Node.js and npm?

What does the future hold for Node.js and npm? I really like both projects and I know there has been some issues surrounding Node.js in particular. I don't really have a stance on the tsc politics and just care about the projects continuing like normal from a technical perspective.

Submitted September 25, 2017 at 10:36PM by Linux4096

multiple sites behind a nginx reverse proxy?

Hi, my default file looks like thisserver { listen 80; server_name firstdomain.com; location / { proxy_pass http://myip:8000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } } I have a 2nd node.js app running on port 4000, if i go to firstdomain.com:4000, I see it.However, I also setupseconddomain.conf as follows server { listen 80; server_name seconddomain.com www.seconddomain.com; location / { proxy_pass http://myip:4000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } } the problem is when I go to seconddomain.com, it goes to my default app on port 8000.I tried to remove default, and add a firstdomain.conf file, but that did not work either.any ideas on why this could be happening or what i'm missing?I am tempted to use something like thishttps://github.com/OptimalBits/redbird

Submitted September 25, 2017 at 06:55PM by sayurichick

Tutorial - Learn Node.js by building real-world applications with Node, Express, MongoDB, Mocha, and more!

http://ift.tt/2wPaImc

Submitted September 25, 2017 at 07:02PM by penialman

NodeJS leadership is a toxic mess

http://ift.tt/2htqicQ

Submitted September 25, 2017 at 08:25PM by errw

Schedule shell command execution through Google Calendar

http://ift.tt/2jVf6de

Submitted September 25, 2017 at 04:22PM by tokaka

A plea for moderation and understanding on diversity from the organizer of Assert(js)

http://ift.tt/2xAAGZH

Submitted September 25, 2017 at 02:37PM by pauldowman

Sunday 24 September 2017

Consider npm package dependencies and impact before installing it

http://ift.tt/2xprc3W

Submitted September 25, 2017 at 07:09AM by delfrrr

axideDB beta - the next-gen database for microservices built in Node.js

http://ift.tt/2y2iM38

Submitted September 25, 2017 at 12:24AM by Etha_n

Jenkins testing with multiple containers

Typically we have an app that consitutes multiple Docker containers (service A, service B, Redis, Postgre, etc), how would you instanitate this environment and execute testing during a Jenkins build? e.g. simply run docker-compose within the Jenkins master?any tips on testing over a dockerzied Jenkins will be appreciated

Submitted September 24, 2017 at 08:29PM by yonatannn

What do I need to learn about nodejs in order to be job ready?

I have around 2 years experience with front end dev but I want to move to backend using node cause I'm starting to hate HTML/CSS.I've been learning node for the past few days by watching and following tutorials on youtube. I also did nodeschool's tutorials which helped me learn some fundamentals. I'm starting to understand more about the different node modules (fs, http, events), asynchronous vs synchronous and more.There's obviously a lot to learn about nodejs and I don't want to know how to build a chat app using socket.io or create a crud app using expressjs.What I really want to know is what do I need to know about nodejs that will actually get me a job as a nodejs/backend developer? What are the MUST HAVE/KNOW skills, what should I be able to do with nodejs that will actually be useful to companies?Thanks

Submitted September 24, 2017 at 07:16PM by crazyboy867

Electron Directories Different in Dev/Release

Im proud to say I've finally build a full-scale prototype for an Electron app. Woo.Sadly, I'm stuck with this annoying issue. When in dev, I can refer to the root directory like so: ./public/hbs/Template.hbs. When in live, public is moved to resources/app/public`. Is there really no way to automate that? Do I have to change those directories before build?

Submitted September 24, 2017 at 04:59PM by Crowesco

♻️ Get, set, or delete nested properties of process.env using a dot path

http://ift.tt/2wKyj7z

Submitted September 24, 2017 at 03:08PM by simonepri

Socket.io: Wait for reply or handle error

Hi,my application should send some JSON to the nodeJS server and wait for the server to reply with an answer within 30 seconds.socket.emit('identifier', myJson); Either I should get a message from the nodeJS server with{'status': 'ok', 'data': { ... } } {'status': 'error', 'data': { ... } } But in case I don't get a reply within 30 seconds I want to handle it like there was an error and do what needs to be done (call methods, etc.).Emitting things and Broadcasting is not the problem I encounter, the "simple" waiting 30 seconds if there is a reply and then handling this reply or handling it as an error if there was none is the part I can't get to work.Any help is welcome. Thanks.edit: Typo

Submitted September 24, 2017 at 02:34PM by 23r01nf1n17y

I'm looking for help with installing node.js on windows 10.

Hello everyone,I'm trying to set up a laravel 5.2 project on my pc with windows 10.I installed the current version of node js (8.5.0) I also have python 2.7 and windows build toolsI can run node -v and npm -v without any issue.However when I'm trying to run anything related to laravel, laravel elixir, node-sass, gulp. I'm hitting a wall.Nothing is working.So basically, I want to run laravel elixir with gulp and node-sass. That's it.I have this file in my project directory: package.json: { "private": true, "scripts": { "prod": "gulp --production", "dev": "gulp watch" }, "devDependencies": { "gulp": "^3.9.1", "laravel-elixir": "^6.0.0-16" } } Here it is the guide I'm following: http://ift.tt/2xxPd8i this is the output I get : https://kopy.io/xR5AG

Submitted September 24, 2017 at 01:31PM by megapowa

Passport & JWT & Google/Facebook Strategy - How do I combine JWT and Google/Facebook Strategy?

http://ift.tt/2wJIKIx

Submitted September 24, 2017 at 08:14AM by Vaderico

New Node.js Programmer Looking for some help?

Hi, New Node.js programmer here. I was trying to do:module.exports ={async getFileAsString(path){ if (!path) { throw "No Path Provided!"; } let file = await fs.readFile(path,'utf8'); return file; }}but I keep getting an Unexpected Identifier error pointing to getFileAsString(path). Can someone explain why this is giving me an error and how I can fix it?

Submitted September 24, 2017 at 08:20AM by karuaan

Android Chat, REST FCM vs NODEJS SOCKET

Hi I want to implement an Android chat app. I want to know the pros and cons between using these schemes:Android to Laravel backend (via REST) to FCMAndroid that keep live connection to Node.js SocketI'm sure most engineers here have an answer for this.Many thanks.

Submitted September 24, 2017 at 08:39AM by putrapurba

NPM CEO: "/r/node is not part of the node community. It's a place for GamerGate/KiA/TRP to launch attacks on the @nodejs community."

https://twitter.com/izs/status/911732466758516736

Submitted September 24, 2017 at 06:30AM by TheNazruddin

Saturday 23 September 2017

Calculating costs and figuring out cloud requirements for a node application

Small background: I have created a simple website in Drupal for my non-profit sports team. We have been running it for two years and we are paying around €150 a year for the hosting (Belgium).I'm a student and one of the assignments is to create a web application with the MEAN stack. It would be fun to create something that is functional, so why not revamp my old Drupal site? Aside from it being a simple site, I would like digitize simple administrative tasks (save competition data, graphs) and add some sort of newsblog. Our usage is limited, around 500 visitors a year. Blogs, adding competition data, etc. would only happen a few times a month.Since we have a limited budget, I want to find a simple cloud service without going overkill. How do you set benchmarks on your cloud service requirements? How do you calculate the costs? What's your course of action when choosing a hosting service?At the moment it feels like I'm going to try out different services and end up blowing our budget on trial-and-error. I hope some of you could guide me in some direction.

Submitted September 23, 2017 at 10:41PM by Tumladhir

[Hiring] Looking for a project to work on? (node.js)

Hello, do you believe in free markets, do you prefer being good to looking good and do you prefer being a partner in a project rather than an employee?If so and you are good at node.js (or are working on being good at it), you may have found business partners.We are working on a market place for the popular game.If you are interested, let me know. I'll share with you details.Btw: hope you like a steep learning curve. :)

Submitted September 23, 2017 at 11:09PM by imrer

Using a variable from the nodejs file in my other js file

Sorry for the unclear title.I have a nodejs file that runs a server using express and it contains a variable.How do I use that variable in another javascript file (the one that actually gets ran clientside through html)For example:Say my nodejs file has a variable called "test" and the value is 5 (var test = 5;) how do I then use that test variable client side.Sorry for my bad english and lack of nodejs skills.

Submitted September 23, 2017 at 10:05PM by Mavast

Sharing Context from handlers to controllers

Hi Everyone -I have an express app with your conventional setup of an app.js file, routes and controller directory. Every incoming request has context values that I need in my controllers to make an API call and subsequently respond back to the end-user.Right now, its silly, I have the same code EVERYWHERE in my handlers.express.post('/install', async function(req, res) { //fetching values from context let value1 = req.value1; let value2 = req.value2 await controller.doSomething(value1, value2) }); Im still a n00b programmer, but I know having to do this in every handler and my controllers having the same freaking params seems like a DRY principle not followed.Should I write a middleware that stores the values in an object? If so how is that object then passed to my controllers?Any help would be appreciated and I hope my question is clear.

Submitted September 23, 2017 at 10:18PM by pratiks3

Decent full stack boilerplate with node(express), sass, and es6?

I've been hunting around for the past few hours for a decent boilerplate which uses express, sass, babel for front end javascript, and some kind of live reloading. The problem is that every boilerplate I've found that comes close to this uses some framework like angular, react, vue, etc. Does anyone know of a boilerplate which fits my needs?

Submitted September 23, 2017 at 09:46PM by sudormname

[Speech To Text] Google Cloud Speech To Text Cloud API Not Working on NodeJS

I was trying to stream audio from browser mic to Google Cloud API for speech to text using socket.io heres the code for socket if (!navigator.getUserMedia) navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia; if (navigator.getUserMedia) { navigator.getUserMedia({audio: true}, success, function (e) { alert('Error capturing audio.'); }); } else alert('getUserMedia not supported in this browser.'); var recording = false; window.startRecording = function () { recording = true; }; window.stopRecording = function () { recording = false; }; function success(e) { audioContext = window.AudioContext || window.webkitAudioContext; context = new audioContext(); // the sample rate is in context.sampleRate audioInput = context.createMediaStreamSource(e); var bufferSize = 4096; recorder = context.createScriptProcessor(bufferSize, 1, 1); recorder.onaudioprocess = function (e) { if (!recording) return; var left = e.inputBuffer.getChannelData(0); client.emit('stream', {stream: convertoFloat32ToInt16(left), rate: context.sampleRate}); }; audioInput.connect(recorder); recorder.connect(context.destination); } the above is client side codebackend has the following codeio.sockets.on('connection', function (client) { client.on('stream', function (obj) { request.config.sampleRateHertz = obj.rate; var recognizeStream = speech.streamingRecognize(request) .on('error', function (e) { console.log(e); }) .on('data', function (d) { console.log(d); }); recognizeStream.write(obj.stream); }); }); i am getting empty response . i was looking at the demo of google cloud API and was trying to implement itPlease Help Me with this

Submitted September 23, 2017 at 03:59PM by jishnutp

Implementing stripe

http://ift.tt/2xZpjM3'm new to node.js and have a app running with express and EJS. Now I'm trying to add ideal payments.I've been working on trying to get this to work for a while now and I'm just plain stuck. Here do I add the code that is listed in these docs? Could someone walk me through the steps?

Submitted September 23, 2017 at 02:49PM by hero_complex_volcano

Promise based async queue manager for node and browser

http://ift.tt/2hm9J6g

Submitted September 23, 2017 at 02:53PM by subbu963

Two Bucks Screencasts - TDD your first NPM package

https://www.youtube.com/playlist?list=PLgiw5WLzo-utJVskJ7bGAnO1gnp54nBgD

Submitted September 23, 2017 at 01:13PM by shime_rb

Debugging in 2017 with Node.js

https://www.youtube.com/watch?v=Xb_0awoShR8

Submitted September 23, 2017 at 12:07PM by fagnerbrack

Efficient Augmented Reality for the Web - 60fps on mobile!

http://ift.tt/2lD528e

Submitted September 23, 2017 at 09:12AM by ratancs

Friday 22 September 2017

Announcing Stackdriver Debugger for Node.js

http://ift.tt/2wGL1nG

Submitted September 23, 2017 at 12:22AM by fhoffa

Getting an error with XMLHttpRequest and not sure what to do.

I have been banging my head against this for a few days and am not sure what I am doing wrong or what I should be doing differently. I am trying to hit an API endpoint via post. I can hit the endpoint just fine when I use postman (with interceptor so I can set my origin header). Postman is using a total of 3 headers and 2 parameters.As soon as I move to code I am running into the following error (found in responseText) on readyState 3, {"error":"server_error","error_description":"Unable to deserialize token envelope."} with a status of 400.I have other requests to different end points that are working just fine (granted they are all gets). I don't know if this is a post problem or something else. Any advice on anything I can try to change or code I can put in to help debug?Sorry if this is the wrong sub for this.If I intentionally break a parameter I get a response that I am missing a parameter, which I would expect. So

Submitted September 22, 2017 at 10:19PM by azazael13

NPM CEO: "If you are not a white dude and have things to say about JavaScript testing, please submit a talk to Assert(js)"

https://twitter.com/izs/status/911105515798720513

Submitted September 22, 2017 at 06:46PM by bkv

Newbie question!

i'm new to node.js. I would really appreciate if somebody could help me though.Basically I need a converation tree for a chatbot. Can anybody help me how to start on this project?I can't relly find something about converation trees in the Node.Js documentary.Thank you very much

Submitted September 22, 2017 at 04:07PM by Dropcunts

Announcing Stackdriver Debugger for Node.js

http://ift.tt/2wLSDk8

Submitted September 22, 2017 at 04:47PM by justinblat

Webtasks brings node 8, no cold starts, and streamlined on-boarding to Serverless

http://ift.tt/2jMpELH

Submitted September 22, 2017 at 04:50PM by NotMyself

Is Raneta SEO friendly?

I have absolutely no experience with js frameworks but im learning and i want to know (so i would not have to change stuff mid-project) if Raneta is SEO friendly? For a project that is very focused on SEO.Or are there any other js frameworks that are good for SEO??http://ift.tt/1jMr4JB

Submitted September 22, 2017 at 05:01PM by Dreamer_tm

If anyone is familiar with the Motion.ai platform for building chatbots....

I could use some help.I'm trying to build a chatbot using the Motion.ai platform for a client.I am pulling the addresses for images from a JSON file, and displaying them in the chatbot, but the images are HUGE. Is there a way to resize the images before displaying the images?I know Motion.ai's node.js has imageMagick preloaded, but I'm very ignorant as to what the hell I'm doing with that.This chatbot would be running on a website, so none of the images will be local, they would all be in a JSON file.Thanks.

Submitted September 22, 2017 at 03:22PM by Nyteris

Testing Node and Express with TypeScript, Mocha, Chai and Sinon.js

http://ift.tt/2xk2u50

Submitted September 22, 2017 at 03:27PM by aderoz

Node.js Weekly Update - September 22

http://ift.tt/2hnBuaF

Submitted September 22, 2017 at 01:38PM by hfeeri

Why Composition is Harder with Classes

http://ift.tt/2uZImns

Submitted September 22, 2017 at 12:51PM by fagnerbrack

Anyone using npm link/yarn link successfully for developing local libraries?

I want to have library auto-building in one terminal and used in another project seamlessly after every file change.I'm a bit surprised to discover exactly the same problem with npm and yarn -- after installing new packages, symlinked packages disappear.npm issue - http://ift.tt/2xmeSiD issue - 1214, 3288Do you put linked libs in package.json or just run npm link? How do you use linking? Are you having the same problems? Any easy workarounds?Thanks

Submitted September 22, 2017 at 11:59AM by Madd0g

Machine-learning for Node.js

http://ift.tt/Vig7ed

Submitted September 22, 2017 at 08:34AM by indatawetrust

Concatenate express app to one file

Is it possible to concatenate an entire express app with es6 sytanx and a file structure similar to the one created by the express generator to one file? I've read about uglify and grunt, however I haven't seen anything specific to express.

Submitted September 22, 2017 at 04:21AM by programmingbackup

How to Make Your Node JS Web App load Faster

http://ift.tt/2hmB5FG

Submitted September 22, 2017 at 08:01AM by Kattieaustin

Thursday 21 September 2017

purest: a generic REST API library that supports popular providers (google/youtube/etc)

http://ift.tt/W2AwEs

Submitted September 22, 2017 at 03:20AM by laggingreflex

Good feedback from a PHP dev migrating to Nodejs

http://ift.tt/2xl3G5y

Submitted September 21, 2017 at 09:13PM by batmansmk

Interview of Harminder Virk, creator of AdonisJs

http://ift.tt/2yvmlw2

Submitted September 21, 2017 at 09:40PM by romainlanz

Learn Node.js?

Hi, i've received an scholarship to learn Node.js. I know HTML, CSS and basic Javascript. My question is. Is easy learn Node? How is the comunity around this technology?

Submitted September 21, 2017 at 09:45PM by kevor_01

Authenticating a Bitly app?

Can anyone help me with authenticating a Bitly nodejs app?I have the access token for my own account but what are the steps for authenticating a different user?

Submitted September 21, 2017 at 06:06PM by christianbear1221

How to Integrate Elasticsearch into Your Node.js Application

http://ift.tt/2xxxA9d

Submitted September 21, 2017 at 03:47PM by elsalgo

Node.js Performance Monitoring - Part 3: Diagnosing the Event Loop

http://ift.tt/2xRZmhw

Submitted September 21, 2017 at 03:35PM by _bit

Express Gateway, 1.2.0 - new release for open source api gateway built entirely on Express.js

Hey! We just released the next iteration of Express Gateway, an open source API Gateway built entirely on Express.js.Based on community feedback, in Express Gateway 1.2.0 we have added a new Plugin engine that allows developers to add their own Extension entities with a plugin which you can then utilize dynamically within Express Gateway.So, if this is super interesting for you, we'd love to get your feedback and get to know more about your use case.Hit us up!

Submitted September 21, 2017 at 09:55AM by robotixs

Build a “Serverless” Node.js Ping Service + Status Page in 5 Steps with StdLib Scheduled Tasks

http://ift.tt/2yfm2V0

Submitted September 21, 2017 at 10:34AM by keithwhor

Youtube-To, a package for converting Youtube URLs to audio/video formats. FFMPEG is automatically downloaded by "npm install youtube-to".

http://ift.tt/2yfaRLY

Submitted September 21, 2017 at 07:35AM by skakabop

Wednesday 20 September 2017

“Unexpected token in JSON at position 0”?

I'm writing a node.js module which imports a JSON file:const distDirPath = "c:/temp/dist/"; const targetPagePath = "c:/temp/index.html"; const cliJsonPath = "C:/CODE/MyApp/.angular-cli.json"; const fs = require('fs');function deployAot() { var version = JSON.parse(fs.readFileSync(cliJsonPath, 'utf8')).version; }// export the module module.exports = { DeployAot: deployAot }; I validated the contents of the json file above in https://jsonlint.com/ and it's valid json but the first line of code above in deployAot() returns the following error when I exec the node module:"Unexpected token in JSON at position 0"Here's the json being imported:http://ift.tt/2w7OebK idea what the problem might be here?

Submitted September 20, 2017 at 11:16PM by random503

Can anyone help solve /r/changemyview's issue where DeltaBot makes multiple sticky comments in a post?

Quick background: /r/changemyview uses /u/DeltaBot to run the delta system.One task it has is to make a stickied comment when OP awards a delta, and a corresponding post in /r/DeltaLog.A big issue for us recently is DeltaBot making multiple stickied comments/DeltaLog posts for the same CMV post. Here is the issue on GitHub (duplicate issue), which I believe might be related to this issue.Does anyone know how to fix this?

Submitted September 20, 2017 at 02:08PM by Snorrrlax

Mastering the Node.js Core Modules - The Process Module

http://ift.tt/2xvXav8

Submitted September 20, 2017 at 12:35PM by hfeeri

What’s New in Node.js Version 8 – Medium

http://ift.tt/2xlF8va

Submitted September 20, 2017 at 07:10AM by EllaNicholls

Cheatsheet for the JavaScript knowledge you will frequently encounter in modern projects.

http://ift.tt/2w3xORM

Submitted September 20, 2017 at 07:30AM by ratancs

Tuesday 19 September 2017

Tutorial User Authentication System with NodeJS - Prelude

https://www.youtube.com/attribution_link?a=hHI7j8_nCbQ&u=%2Fwatch%3Fv%3DEHUXMEFHzCY%26feature%3Dshare

Submitted September 20, 2017 at 02:50AM by EQuimper

Open Source Dependency Security Scanner, now supports npm

Hi all! I have been developing a free app for my job at Black Duck Software that can scan your open source repositories on GitHub and produces a report on the security risk of your dependencies.As of today we finally support npm! You all know how interconnected npm components are. Today you can finally find out if any of your dependencies or transitive dependencies have known security vulnerabilities and get guidance on how to fix it.The url is http://ift.tt/2xln8RA're in an open beta right now, and I'd really love to get you guys' feedback about what you like and don't like about the tool, and how we can make it really serve the needs of the open source community! Previous feedback from redditors on other subreddits has really helped me improve things, so please let me have it. I'll answer any questions that anybody has.

Submitted September 20, 2017 at 02:25AM by nickavv

Node.js dev interested in a partnership?

Hello, are you skilled at node.js,have free time and want to be partner at new project? We believe in free market and we are currently building one for digital items of one popular game. Interested? PM me.

Submitted September 19, 2017 at 11:13PM by imrer

What things should I know as a professional NodeJS developer?

I just started a new job as a web-dev consultant, having worked professionally with web development in Django (Python) for about two years. Since Python is rare in this industry in my area (Stockholm) and the closest neighbor Ruby (Rails) is on the downturn, I'm looking to learn NodeJS, with a focus on backend programming. My goal is to achieve skills roughly equivalent of someone with 2.5 years of NodeJS experience, as soon as possible.I'm having trouble figuring out what I should focus my learning on though. I know the syntax (including ES6) and some of the tooling (mostly the frontend stuff though), but since the core library is so tiny it's hard to figure out what to do next. I guess I could spend some time learning the top 20 libraries or something, but I'm having trouble figuring out how to architect actual applications (at say, 5-50k SLOC).If you were to hire a NodeJS developer with say 2.5 years experience, what things would you expect of them?

Submitted September 19, 2017 at 08:51PM by Ran4

trying to debug node.js module in chrome dev tools

I have node.js v.8.5.0 and chrome v.60 installed on my computer. I was using the following url as a reference in order to figure out the process to debug a node.js module in the Chrome Node.js Developer Tools (NDT) window:http://ift.tt/2hdt5dx added my-custom-node-module directory to the Sources panel and set my desired breakpoint but I'm not clear on how to run the module in the context of NDT.For example, I with the NDT window open, I executed a standard node exec cmd:node my-custom-node-module.js This executed the node module but it didn't trigger the breakpoint that I had set. What step am I missing in order to run a custom node module in debug mode so that it hits a breakpoint in the NDT window?

Submitted September 19, 2017 at 07:01PM by random503

[Feedback Request] Released My First Production Node App

http://ift.tt/2wUPD6R

Submitted September 19, 2017 at 03:22PM by treyhuffine

Deploying node apps - just use package managers or something like docker?

Two questions:I'm building a MERN stack app for the first time, and my goal is to build the app, store all the code in a repo, then have a client clone the repo and be able to build the app on their end as simply as possible. I know npm/yarn handle dependencies and all that, but do I need to/should I use docker to simplify the process? I'm used to working with PHP where I provision the server on my end, maybe send them the front end code that calls out to the server I set up, but for this I need to submit the code for the entire app and have it build and deploy on their end (back-end, front-end, database, everything). What's the best/simplest way to go about this?Second question, say I start working on my project at work, and then want to pick up where I left off at home. Can I do this solely through a github repo and yarn? I think it should be simple (push the code when I'm done at work, pull the repo when I get home and run yarn install) but last time I tried to do it I think things got more complicated than I expected (maybe it had to do with my mongo database)?Thanks for the help, sorry for the beginner-ish level of these questions.

Submitted September 19, 2017 at 03:49PM by tangled_up_in_blue

Node.js HTTP recording proxy for CI environments

http://ift.tt/2ylAuM8

Submitted September 19, 2017 at 12:00PM by ijpiantanida

understanding async/await in 7 seconds

https://twitter.com/manekinekko/status/855824609299636230

Submitted September 19, 2017 at 10:38AM by indatawetrust

Cool and useful code inspection packages?

How do you continously inspect your code:which is your integration platform (e.g. Jenkins, Travis, etc)?which inspections/checks does your code run through (testing, linting, etc)? which specific NPM packages (e.g. SuperTest for API, ESLint, Istanbul for coverage, etc)?Any CI/CD/Build tips that pop to your mind are welcome

Submitted September 19, 2017 at 08:55AM by yonatannn

How to use scientist/refactor testing?

I've come across the idea of scientist in the past, and I just had a use case (replacing hard-coded values with a function that generates them)... but I can't understand the docs.http://ift.tt/24xesAL http://ift.tt/1PZxf1f http://ift.tt/2f7rAJR all examples that let you run your old control code and new code side-by-side.But I can't understand the Runnable's node-scientist has a simple API, but I can't see how to get the error, if there is one.Can someone explain a straightforward use case, or a more used/up to date module that does this?Thanks!

Submitted September 19, 2017 at 07:04AM by voiping

Monday 18 September 2017

Meet: Saved. The native Array / Object which is saved permanently in Redis.

http://ift.tt/2f5ahZC

Submitted September 18, 2017 at 10:54PM by kinsi55

Last Week in Node.js Working Groups - September 11th - NodeSource

http://ift.tt/2hdc0gc

Submitted September 18, 2017 at 10:17PM by _bit

Which web framework would you choose to work with GraphQL?

Hi. There are lot of web framework for Node.js. Which one would you choose for new application, for building GraphQL APIs?

Submitted September 18, 2017 at 06:36PM by matyyyy

Best place for a begginer in back-end to start learning Node?

Hey guys!I want to learn a backend technology and i think ill stick with node and php, just want to know if you guys recommend anything for a begginer, maybe something you wish you knew before you started in backend?Thanks a lot!

Submitted September 18, 2017 at 05:49PM by coresomething

Vivint's Game of Codes – week long programming contest, $20k in prizes. Supports Node!

https://goc.vivint.com/

Submitted September 18, 2017 at 05:07PM by jtolds

Multithreading in Node.js

http://ift.tt/2mCIdmR

Submitted September 18, 2017 at 05:08PM by shime_rb

On-Demand Environments With Docker and AWS ECS

http://ift.tt/2jAUczW

Submitted September 18, 2017 at 02:55PM by michaelherman

Collect runtime type information 😻 of your JavaScript code.

http://ift.tt/2fbxt8W

Submitted September 18, 2017 at 06:23AM by ratancs

How to benchmark execution time and memory usage?

I have a parser that I'm trying to benchmark against other parsers.It seems like Benchmark is the most popular approach but I think it doesn't measure memory use (heap etc.).There is Damage which seems nice but there's no Github project anymore, and it was last updated 4 years ago.Can anyone recommend some libraries for this?

Submitted September 18, 2017 at 08:15AM by holloway

Looking for an API server code review

I attempted to use Express to make an API server for generation images. I'm not great at js/express yet, and would love advice/reviews on my code.Main PointsI want it to run fasterI want it to use less memory (looking at 600mb/day)I want it to be "best practice". Not so much code style, but how I'm doing things.Minor PointsIs jimp slower than canvas? I'd like faster results.Is this going to run better on a separate server, or as local host to the application using it?Would it be better to run a python script for image generation, and just use express to server it? I've been told python is better at things like image generation.Here is the link to the repo containing all of the code besides the keys.jsonps, this was cross posted in /r/javascript

Submitted September 18, 2017 at 08:19AM by Kerdaloo

vdfplus - A parser for Valve's KeyValue format

There are already some parsers that handle VDF to JSON (and back), but they don't feel "good enough" for me. For example duplicate keys are simply overwritten and data types are ignored.Duplicate keys are actually pretty common in .vdf files, e.g. Dota 2 or most of Steam Controller configs. vdfplus also tries to cast the values in to their respective data type, so numbers are actual numbers and not strings, which makes working with the resulting object inside JavaScript more sane. Additionally vdfplus handles characters like {, }, "inside quoted tokens properly, if they are escaped. And finally I also added a command-line interface, which allows for easy conversion from and to vdf with custom formatting or a sensible default formatting.npm:http://ift.tt/2ftAZvz had quite a bit of fun working on this. The API is inspired by the JSON.parse and JSON.stringify methods. and I also tried to translate the specification to VDF.stringify.Working on vdfplus made me tackle some new topics for me:TypeScriptPackage with CLITAP style tests, only worked with mocha+chai beforebrowserify and uglify to enable browser support for the packageFuture:Maybe add support for unquoted keys and values, which according to the developer wiki are valid.Maybe try to restore comments when going from VDF -> JSON -> VDFFeedback on basically everything is appreciated.

Submitted September 18, 2017 at 07:07AM by RoyalBingBong

Sunday 17 September 2017

Read a text file line-by-line via RxJS + a few helper functions

http://ift.tt/2fdJUon

Submitted September 18, 2017 at 03:57AM by cirsca

[XPOST] is there a good full stack CRUD app framework in nodejs that uses reactjs as the front-end?

http://ift.tt/2fdJUVp

Submitted September 18, 2017 at 04:03AM by ndboost

How to use local variable (json data) in javascript file?

Can someone please help me find out what I am doing wrong, I have been stuck on this for waaaay to long now!I am trying to get data from a json file and use it in my javascript file. I am using a local variable by declaring a variable inn app.js. It works fine if I write: "<%= appledata.appels.apple2 %>" in my html code. But in javascript It does not..This is my code:function getPrice() { var applePrice; applePrice = appledata.appels.apple2; return applePrice;} function calculateTotPrice() { var TotPrice = getPrice(); var divobj = document.getElementById('totalPrice'); divobj.style.display='block'; divobj.innerHTML = fastPrisGardermoen; } appels.json:{ "appels": { "apple1": 10, "apple2": 15 } } app.js:app.locals.appledata = require("./appels.json"); html site:
all help is much appreciated!

Submitted September 17, 2017 at 02:41PM by stiros

what is the best editor to work with node?

No text found

Submitted September 17, 2017 at 02:02PM by uzbekkhan

Creating an HTTPs server with Node.js and Express

http://ift.tt/2sxvYdf

Submitted September 17, 2017 at 01:13PM by nulless

Trouble deciding between 2 servers on scaleway

Hey guys, most of the time I run around 7 node processes. Im having trouble deciding between either getting 2 x64 cores or 4 Armv7 cores. Any thoughts?E. They are the same price and ram and connection speed.

Submitted September 17, 2017 at 11:38AM by kishichi

A neural network library built in JavaScript

http://ift.tt/1Oq27VL

Submitted September 17, 2017 at 09:50AM by indatawetrust

Does something like a "redis-cached-object" exist?

Essentially, allowing me to create an array / object in my node app, which then will get "backed up" to redis, and "imported" from said on start. Seems like such a simple and useful module to me, but i cannot find anything like it.The idea is that there is a native object / array in node backing the data, so that reads / writes can be performed in a non-async way, and the moving of the data into redis is done in the background

Submitted September 17, 2017 at 05:25AM by kinsi55

My Node server code is getting large, how to handle it (Over 1k lines)?

I have server code which handles a multiplayer game. I am just wondering if its normal to have many lines for Node since you can't make classes without ES6 (or something I believe).Is there a way to refactor my code? It will only get bigger as more features are being added.

Submitted September 17, 2017 at 07:11AM by applesauce911

Saturday 16 September 2017

How to be Job-Ready?

I would say that I am intermediate NodeJS developer,But I still feel I am not ready for enterprise level real time Job. Please suggest some course/Links or some stuff after which I can apply confidently for a Full Time NodeJS developer.P.S. You can see my projects here : http://ift.tt/2jyZYSO

Submitted September 16, 2017 at 11:25PM by sushantshekhar20

0/300

I am working with random Proxies and some of them are not working or really slow. I am using Nodejs and the Request module http://ift.tt/2wy3iib] I tried to set the timeout like this:requestOptions = { proxy: 'http://xxxxxxxxx:xxx', timeout: 5000, localAddress: '127.0.0.1', jar: true, headers: { 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'en;q=0.5', 'Cache-Control': 'max-age=0', 'Connection': 'keep-alive', 'DNT': 1 } But it still can take forever. Is there any other way to timeout faster?

Submitted September 17, 2017 at 12:01AM by johnnyXcrane

JavaScript : Value vs Reference

http://ift.tt/2h9lywd

Submitted September 16, 2017 at 08:57PM by idesi

npm workflow with container?

Hi,I'm using the Serverless framework to develop Lambda functions. I want to utilize the Sharp library for image resizing, but it needs to be complied on an Amazon Linux server. Does anyone have a workflow to setup an Amazon Linux container with npm and rebuild my node_modules folder under that architecture? I had it running last night, but was still getting the invalid elf header error, so I'm not sure I did it right.

Submitted September 16, 2017 at 08:01PM by jackmusick

Convincing work that Node.js isn't evil

I'm a junior web developer working as an apprentice (I learn on the job). The company I work for mostly uses C# and Java, which is fair enough, given the huge scale of their application. However, the CTO believes that Node and functional programming is the devil of the software industry. I completely understand where he's coming from with this. Going back to OOP after a long time with Node was great, but it also has its flaws. No other programming language has Node's ecosystem.How can I convince him that trying Node in the company isn't such a bad idea? I'm not suggesting they immediately start rewriting it all in Node. I just want them to try it.

Submitted September 16, 2017 at 07:02PM by _unst4bl3

1 KB JavaScript view framework.

http://ift.tt/2khNzlx

Submitted September 16, 2017 at 03:11PM by jbucaran

One year working with Node.js after PHP and .NET - Challenges, comparisons and improvements

http://ift.tt/2wwAgzD

Submitted September 16, 2017 at 09:25AM by jonathasrr

Serverless + Chatbots?

Hi /r/nodeI'm curious: is it possible to implement a chatbot on a static webpage that could, for example, process booking requests (for any old service - say a hairdresser appointment)?If the chatbot interfaced with an relational database to check if the end-user is a previous client (say based on their phone number submitted in a form), this would probably require sessions correct, and couldn't be achieved using lambda/cloud functions etc? As it would require multi-stage submissions. It would also need to interface with google's calendar api.Just curious if anyone's tackled this sort of thing before.

Submitted September 16, 2017 at 08:16AM by ajc820

A node.js command line app for packing Google Chrome extensions.

http://ift.tt/2jS1jCa

Submitted September 16, 2017 at 05:45AM by jbucaran

Friday 15 September 2017

A Deeper Look Into Async/Await

http://ift.tt/2yeSebY

Submitted September 16, 2017 at 03:38AM by xenopticon

Serving ES6 to the client?

I am not sure if this is the place to ask this, but I was wondering if anyone knew any resources on serving ES6 to the browser directly.Right now, the way to use ES6 is to obviously bundle and minify it using a build system like webpack + babel + uglify, but I would like to see the performance and size impacts of serving a truly ES6 website.I could even leave my webpack build process in place and serve the ES5 package if there were missing features, but everytime I google 'serve es6' or 'es6 client' alongside any other keywords, I just am overwhelmed with webpack articles.Thanks in advance.

Submitted September 16, 2017 at 01:22AM by nawgzy

TCP Emitter Client

http://ift.tt/2x94mgd

Submitted September 15, 2017 at 10:04PM by taboneIO

Questions about securing an API

In my project I am using Hapi to build my API. I am looking for the best way to secure some of the API endpoints.Every tutorial I've found on the subject says to use JWT. But I'm not sure if that is the best fit for me.The protected routes will be for an "admin" user. And since JWTs expire quickly (for security reasons). I wouldn't want my user having to login repeatedly. So does anyone have any recommendations for how I can handle this?

Submitted September 15, 2017 at 09:40PM by whostolemyusrname

The node-static Debacle: A Semver Parable

http://ift.tt/2xF5M3d

Submitted September 15, 2017 at 06:27PM by code_barbarian

Node.js siridb addon for a time series database

http://ift.tt/2fobxHZ

Submitted September 15, 2017 at 04:45PM by Psps22

Continuous integration/deployment in clientside apps?

I have a private app built on node that is being run by a couple of different machines. These machines are remote, and all they do is collect data and push it to a database. I need a way to be able to update these remote clients without having to tell them to.Currently, I'm running a cron job every 15 minutes that runs a node script that runs a bash script to pull from a git repo, but this can cause issues if the git pull isn't successful, there are conflicts, or if I don't want to wait 15 minutes for it to run. I tried looking into a couple of different CI solutions, but I'm really unfamiliar with them and they seem almost like overkill.Instead, I was thinking of using sockets with a better git interface (nodegit), but can anyone point me in a better direction?

Submitted September 15, 2017 at 05:08PM by PortalGod

Small module to kill process that uses selected port

Hey,I had an issue that I had to kill a process that uses a specific port. So I came up with the solution and decided to push it to the community.Maybe someone will find it useful one day :)NPM Package

Submitted September 15, 2017 at 04:06PM by Krizzu

Node.JS Top 10 Articles (v.Sep 2017)

http://ift.tt/2y3FNPt

Submitted September 15, 2017 at 03:47PM by mightbbest

Node.js Weekly Update - September 15

http://ift.tt/2faNdg3

Submitted September 15, 2017 at 10:28AM by hfeeri

generaptr: rest without stress

Hi guys, I just launched a node cli package and I was wondering if I can get some feedback. Basically given a database connection (for now just mysql is supported) it reads the tables schema and relations between and with these generates an express api (with sequelize for now as it just supports MySql) which implements the CRUD operations on the entities described by the schema. http://ift.tt/2yb6W3H

Submitted September 15, 2017 at 10:04AM by cupsadarius

Thursday 14 September 2017

Package for dealing with scanning and generating bar codes

I am looking to build something but I will need bar code functionality. I have been looking on NPM and not found anything that stands out to me as good. I am looking for something to scan a bar code and I would then associate data with that bar code. I also need bar code generation for when an item doesn't have one.Anyone have experience with this and have recommendations on what to use? I'm willing to experiment some just wondering if there is something great out there.

Submitted September 14, 2017 at 10:57PM by business_for_life

I made a very barebone simple webapp to monitor my connection. Inventively called Connection Monitor. Great for seeing internet health when you suspect instability. Feature suggestions welcome.

http://ift.tt/2flsin9

Submitted September 14, 2017 at 09:26PM by JonFrost

Journey From Node To Crystal

http://ift.tt/2eViEXN

Submitted September 14, 2017 at 03:13PM by shad0proxy

XML parser and preprocessor as addon : useful or not ?

I know that Javascript is the language to go with Node.js, but I am more interested in developing addons. So, I recently released an XML parser and preprocessor as Node.js addon, and, as I am new to Node.js (and also to Reddit, so I hope this submission is OK), I wonder if:such components are useful,the way in which it is provided is correct, or whether (and if so, how) it can and should be improved.Here's the link to the NPM package : http://ift.tt/2fkRtpZ.

Submitted September 14, 2017 at 02:10PM by Epeios

hiproxy is a lightweight proxy tool based on Node.js that supports an NGINX-like configuration.

http://ift.tt/2tBylgr

Submitted September 14, 2017 at 02:42PM by zdying

Coding Ninjas provides the best online programming courses with 24X7 available videos, industry-tested learning platform, real-time support, hands-on assignments and much more.

http://ift.tt/2fkE6WO

Submitted September 14, 2017 at 01:48PM by codingninjas321

How to combine a NodeJS backend with a ReactJS frontend app

http://ift.tt/2x26qXn

Submitted September 14, 2017 at 12:49PM by codedesi

ES2017's async/await is the best thing to ever happen to JavaScript

http://ift.tt/2rPJoAt

Submitted September 14, 2017 at 01:11PM by fagnerbrack

Meteor or Express for faster prototyping ?

I am proficient in Express but setting up SignUp, Login form using Salting, Hashing, handling JWT, making private routes is a lot of work. So I am considering using Meteor. I have done some research & its very easy to login using Meteor than using Express with Bcrypt & JWT. So is it a good choice for medium to big apps ?

Submitted September 14, 2017 at 09:56AM by deadcoder0904

Use .mjs extension with --experimental-modules flag now

http://ift.tt/2y7E3oU

Submitted September 14, 2017 at 10:35AM by bentinata

Classwrap – Minimal 0.3 KB alternative to classnames. 20x faster & BEM style nested object support.

http://ift.tt/2eTcwz5

Submitted September 14, 2017 at 08:12AM by jbucaran

I was experimenting with Jest and async/await so I wrote this brief blog post

http://ift.tt/2y7b197

Submitted September 14, 2017 at 06:45AM by GitW_85

Wednesday 13 September 2017

My First Tutorial on Creating a REST API Backend using Node's Express.js

http://ift.tt/2w9gFdm

Submitted September 13, 2017 at 10:04PM by AntonioErdeljac

How do you handle server side effects?

Servers follow a request/response pattern, but sometimes the request will trigger database updates, analytics events, an email to be sent, etc. An action is required, but it mostly has no impact on the response itself and looks like it would be best solved by pulling it out of the normal flow of the request handler.My initial thought is to set up some kind of PubSub or observer pattern (not entirely different than something like Redux, but with no state tree since it's the server). Then route handlers can trigger actions that will cause a side effect to processed.What are you all's thoughts? Am I missing a common pattern to handle this?

Submitted September 13, 2017 at 08:48PM by treyhuffine

Further to my announcement last week, I have now updated mustache-file to contain a comand-line version of mustache. Hope you find it useful.

http://ift.tt/2j8YoGW

Submitted September 13, 2017 at 06:35PM by Sixes666

Back to roots: JavaScript Value vs Reference – Miro Koczka – Medium

http://ift.tt/2xZCecS

Submitted September 13, 2017 at 06:45PM by usbecko

What's new in Node.js 8.5?

http://ift.tt/2x0ryv8

Submitted September 13, 2017 at 04:52PM by hfeeri

Learn Node.js in 2017 from these books & tutorials.

http://ift.tt/2u44SMa

Submitted September 13, 2017 at 04:25PM by ReactDOM

Understanding & Measuring HTTP Timings with Node.js

http://ift.tt/2jn88gS

Submitted September 13, 2017 at 04:15PM by hfeeri

Bredis - Light Redis implementation on the browser

http://ift.tt/2y5epRF

Submitted September 13, 2017 at 12:48PM by bearni

Help:: Mongoose with Regex is not working on Mlab to get Json arrays

http://ift.tt/2xkolZM

Submitted September 13, 2017 at 01:04PM by RenjithVR4

(2013) Javascript “Underscore” library is not functional programming friendly because of the order of the arguments

https://m.youtube.com/watch?v=m3svKOdZijA

Submitted September 13, 2017 at 11:46AM by fagnerbrack

Analyzing JavaScript dependencies

http://ift.tt/2jn3Ia4

Submitted September 13, 2017 at 10:29AM by shime_rb

the Node.js Security Survey

http://ift.tt/2jneP2H

Submitted September 13, 2017 at 08:46AM by ecares

Tuesday 12 September 2017

Question about general architecture for app using node, socket.io and google/fb login

I want to build simple app/game using node and socket.io for realtime comm.I also want to authenticate the user using google/fb login. Do I have to implement the login authentication on the client side, or can I do it server side?I'd be more comfortable doing it serverside, but then I don't know how I would ID someone on the client, when sending socket.io messages.If someone could give me a general overview of how the app should be structured I'd greatly appreciate it.

Submitted September 13, 2017 at 03:03AM by b0z33

Should I transpile a library with Babel or TypeScript?

A few people argue against transpiling Node code, which makes sense because you're 1. generating a new source code 2. Node already supports a lot of ES6/ES2017 stuff.However, if you're building a new library that should be used Node, what do you do? Do you write the library with plain Node and write TypeScript types on the DefinitelyTyped (or you don't write them at all)?What about if you aim to write a library that should be used for both Node and client based apps?

Submitted September 12, 2017 at 06:09PM by zurfyx

Nest 4 RELEASE is here! Node.js framework built on top of TypeScript & RxJS

http://ift.tt/2mMuHMR

Submitted September 12, 2017 at 04:50PM by mysliwik

Node v8.5.0 (Current)

http://ift.tt/2wUj6QC

Submitted September 12, 2017 at 04:51PM by dwaxe

Node app hangs until enter pressed

Often my node app hangs and nothing happens. For example, I'd make a request in the browser and the connection would just hang until I press enter in the process console. Right after I hit enter process continues and page loads instantly.I'm using node v6.10.3 on windows 10. Other than node & npm being a bit slow I don't notice any other problems.Why does this happen?

Submitted September 12, 2017 at 03:33PM by _ante

Securing Node.js RESTful APIs with JSON Web Tokens

http://ift.tt/2eEyrO4

Submitted September 12, 2017 at 03:54PM by ReactDOM

[Updated] JavaScript/C++ Rosetta Stone

http://ift.tt/2pJmlYx

Submitted September 12, 2017 at 03:11PM by MoTTs_

Nest 4 RELEASE is here! Node.js framework built on top of TypeScript & RxJS

http://ift.tt/2eT4C8Y

Submitted September 12, 2017 at 02:00PM by mysliwik

Declaratively securing REST APIs to specific clients

http://ift.tt/2gpwDVU

Submitted September 12, 2017 at 12:37PM by ecares

Micro vs Koa vs Express

I have only used Express & I can be quickly productive with Express, but Koa & Micro seems to be a good option. Koa is super lightweight & Micro its even more smaller. So which one would u choose now ?P.S - I'm super comfortable with Express & can pretty much do the job with it but want to try something new

Submitted September 12, 2017 at 10:39AM by deadcoder0904

Node.js version 8 - New Features and improvements

http://ift.tt/2xtQsXc

Submitted September 12, 2017 at 10:45AM by EllaNicholls

Monday 11 September 2017

What do you recommend me in my situation? PHP API vs NodeJS

I've been learning and developing a very simple (almost finished) CRUD web application with JWTAuth included.The application is composed of: - Front-end: VueJS + Bootstrap4 - Backend: MySQL + Lumen (PHP REST API) + JWT for Auth (tymondesigns / jwt-auth)Until recently, I only had a simple shared hosting with Apache, PHP and MySQL.At that moment I doubted whether to do the application with an external service in real time like Firebase, but since it has user limitations among other things, I discarded it.The bad thing about the web application is that I would like to have if I add a record or data (having the application open at the same time on the computer and on the mobile) the changes were reflected in both devices in real time without refreshing the page or do Long Pulling Techniques.Right now I have a VPS that works great for me (in which I have running Webmi/Virtualmin + Websites + TeamSpeak3 server) with the following hardware features: 1 vCore (s), 2.4 GHz, 2GB of RAM, 10 GB SSDI was thinking of implementing something like socket.io to see real-time changes to CRUD on all open devices.I have been reading articles, comparisons and there are now too many technologies, options to create web applications. And this creates me enough doubts / questions that go around my head and it difficults me to decide.Below you will see the list of questions, ** all thinking for what i want to do **:Does the features on my vps server enough to make me do what I want?The best option is to make a REST API in NodeJS, use socket.io to emit when changes are made to the database and use NGINX as http server for static files in the web application (html, js, css ... etc) and configure a proxy reverse to point to the NodeJS server by the port 3000 for queries to the API?MongoDB vs. Mangosta vs MySQL vs another better option?Do you recommend Sails for the MVC?Do you recommend JWT as authentication?Thanks in advance and sorry for my English!

Submitted September 12, 2017 at 03:29AM by BlackCode7

Beginners help to Sequelize!

Hi I’m new to sequelize and am having some issues do you know why the code I’m executing where I’m trying to query a table that is already in the database is creating a new table each time I run this but with an ‘S’ added on?const Sequelize = require('sequelize'); const connection = new Sequelize('nodejs_test', 'user', 'password', { host: 'localhost', dialect: 'mysql' }); const Games = connection.define('node', { video_game: Sequelize.STRING, system: Sequelize.STRING, }); Games.sync().then( () => { return Games.findAll().then(function(game) { console.log(game) }) }); this is what I'm seeing in my terminal after it's completed:Executing (default): CREATE TABLE IF NOT EXISTS nodes (id INTEGER NOT NULL auto_increment , video_game VARCHAR(255), system VARCHAR(255), createdAt DATETIME NOT NULL, updatedAt DATETIME NOT NULL, PRIMARY KEY (id)) ENGINE=InnoDB; Executing (default): SHOW INDEX FROM nodes Executing (default): SELECT id, video_game, system, createdAt, updatedAt FROM nodes AS node;

Submitted September 12, 2017 at 03:38AM by urlclsocalkid

Long time dev, new to node. A few questions regarding websockets and node.

Is socket.io the favored package for dealing with websockets?Is express.js performant when used with socket.io?How scalable is express.js/socket.io when used together?I've read a lot about node/socket.io/express, but I'd like to hear from people actually on the ground about their feelings regarding these technologies. Is there anything I should know before getting started on what will likely be a 200k+ line project?

Submitted September 12, 2017 at 04:03AM by no_youre_not_ugly

An ideal PC to run multiple Node instances?

I'm working on a Node application that does CPU-intensive calcs and can be ran multiple times simultaneously. Unfortunately the VPS it's currently running on seems way underpowered, so I'm thinking of building a PC to run it at home.Any recommendations for hardware to get? I'm assuming CPU it the most important? Is there any way to use a GPU for running Node?Thanks in advance :)

Submitted September 12, 2017 at 01:30AM by kwm

Node HTTP/2 to HTTP/1 Proxy Package

http://ift.tt/2eRl1uK

Submitted September 11, 2017 at 11:08PM by ronagy

Building a Web App with AdonisJS

http://ift.tt/2jgd6fi

Submitted September 11, 2017 at 10:09PM by brokentyro

Switching a socket.io app to run with https

I have an app that was working just fine with HTTP, but now I upgraded my website to HTTPS and it doesn't work anymorethis is the error I get in the console:GET http://ift.tt/2eR4cQA net::ERR_CONNECTION_CLOSED and this is my server side code:var io = require('socket.io').listen(4000); var uh = require('./userhandler'); var fs = require('fs'); var path = require('path'); var userCount = 0; io.configure('production', function() { // io.set('origins', 'localhost:80'); io.set('log level', 1); io.enable('browser client minification'); io.enable('browser client etag'); io.enable('browser client gzip'); }); and this is my client side code:var socket = io.connect('http://ift.tt/2wWcsZc', {'sync disconnect on unload': true}); Can someone please help me fix it? Thanks

Submitted September 11, 2017 at 08:51PM by tigerosh

Last Week in Node.js Working Groups - September 4th

http://ift.tt/2f0wVWN

Submitted September 11, 2017 at 08:55PM by _bit

full stack node js express boilerplate

http://ift.tt/2wlfSS1

Submitted September 11, 2017 at 09:16PM by onerciller

Sequelize Help! - Ordering on eager loaded data

I've looked here: http://ift.tt/2f0xYpC here: http://ift.tt/2jjKp15 all over the internet, but I haven't been able to properly get this working. I want to order my results just like in the first link:db.Page.findAll({ include: [{ model: db.Gallery include: [{ model: db.Artwork }] }], order: [ [ db.Gallery, 'order', 'DESC' ] ] })That however does not work for me, giving an error along the lines of "unkown column 'gallery.order" in 'order clause'

Submitted September 11, 2017 at 09:56PM by datHTTR

From WordPress to JS. A Tale of a Full Stack JavaScript Blog

http://ift.tt/2xsceur

Submitted September 11, 2017 at 07:55PM by dor_tzur

5 Vuex Plugins For Your Next VueJS Project

http://ift.tt/2wkB5Ly

Submitted September 11, 2017 at 08:06PM by Castemson

Introducing Fastify, a Speedy Node.js Web Framework

http://ift.tt/2wl0JmX

Submitted September 11, 2017 at 06:25PM by chocolategirl

How to make Magic links with node

http://ift.tt/2wSKbno

Submitted September 11, 2017 at 02:38PM by jdrouet

Node debugging

http://ift.tt/2xqWKXJ

Submitted September 11, 2017 at 01:56PM by shime_rb

NodeJS is getting an fs.copyFile() function

http://ift.tt/2xZdrGJ

Submitted September 11, 2017 at 11:46AM by fagnerbrack

Google search results

First of, I'm totally new to node.js and I'm using node for a website. And the google search results are kind of annoying, they contain variables that looks like this Is there a way to make google read the content of the variable instead?Thanks

Submitted September 11, 2017 at 12:07PM by OlaMagnell

Sunday 10 September 2017

Creating a JSON Object

What I'm trying to achieve: { "result": [ { "id": 1, "place_title": "Love ya", "image_path": "INSERT_IMAGE_PATH"; }, { "id": 2, "place_title": "Love ya" "image_path": "INSERT_IMAGE_PATH"; } ] } What I'm getting: { "result": [ { "id": 1, "place_title": "Love ya" }, { "id": 2, "place_title": "Love ya" } ] } Code:router.get("/listingImageAndTitle", function(req, res){ let sql = `SELECT * FROM airbnb.listings WHERE user_id = ?;` let values = [1] let listing_id_array = []; let listing_data_array = []; //get place_title and listing_id (for images table) in listing table app.con.query(sql, values, function(err, result){ for(let i = 0; i < result.length; i++){ listing_id_array.push(result[i].id); listing_data_array.push({ id:result[i].id, place_title: result[i].place_title }); } //get image_path in images table for(let i = 0; i < listing_id_array.length; i ++){ let sql = `SELECT * FROM airbnb.images WHERE listing_id = ?;` let values = [listing_id_array[i]]; app.con.query(sql, values, function(err, result){ console.log(result[0].image_path); //How do I get this part be part of the JSON Object? }); } res.json({ "result": listing_data_array }); }); });

Submitted September 11, 2017 at 03:31AM by badboyzpwns

API Authentication with Node | #10 - Unit Testing

https://youtu.be/O1TYpzm5Uh0

Submitted September 10, 2017 at 11:36PM by eXtremeRR

⏱ tsse - Timing safe string equals | String comparison algorithm to prevent Node.js timing attacks.

http://ift.tt/2vOcWO9

Submitted September 10, 2017 at 09:53PM by simonepri

Creating a webapp in node, what's state of the art?

Hey /r/nodeI am looking to build and deploy a webapp using NodeJS. I'm coming from PHP but have recently taken a deeper look into node.My question is rather simple: What's state of the art in terms of web framework, middleware, DB wrapper and such?What frameworks are widely used? Is Express almost always a guarantee? What scales well, what doesn't?I hope I'm not being to vague and would like some info before I start.The webapp is supposed to work as backbone for smartphone apps to connect to a DB (insert, update, select) and also offer a web interface to perform these tasks.Have a good start of next week!

Submitted September 10, 2017 at 08:54PM by AnAlbatroaz

Building a crude Node.js from scratch

http://ift.tt/2eNFMqU

Submitted September 10, 2017 at 06:13PM by shime_rb

Intro to npm - Color Animations in Terminal

https://www.youtube.com/watch?v=IbPMFFy8sos&t=56s

Submitted September 10, 2017 at 02:42PM by saturngirl3773

mysql migrations

hello,I'm coding a backend app using mysql and sequelize.Initially I used sequelize-cli to generate and run migrations, but it did not ended well for two reasons:I had problems whenever I want to fine tune my database schema, i.e. using triggers, sometimes foreign keys creating/editing failed etc.I like to design and sync my database with mysql workbench's diagrams, which generates a sql migration file. Loading sql files from seqeulize-cli is difficult and sometimes it does not workSo my idea is to switch to a different migration tool for mysql which supports well .sql scripts.How do you manage your migrations? do you have any advice?

Submitted September 10, 2017 at 02:11PM by m3l7

Koa or Sails

I guess this is a repeating question..but I am about to choose a backend framework and I wanted to go for nodejs this time. I am reading a lot about BE frameworks but it seems documentations and articles are not really up to date.I figured that the new version of express is called koa just to avoid a new major version and that the lead author moved to GO so no one knows what will happen to the framework. I like Sailjs but it also doesn't seem to be actively developed. On top of it, both have very poor documentation. So I was wondering what other people prefer use and why?Thanks a lot

Submitted September 10, 2017 at 10:06AM by JuliusKoronci

Saturday 9 September 2017

Google Calendar programmatic event bulk insert and listing for Node.js

http://ift.tt/2xcNIws

Submitted September 09, 2017 at 10:07PM by tokaka

The list of CloudFlare IPs for "behind proxy" configs

http://ift.tt/2vVV3kL

Submitted September 09, 2017 at 07:17PM by koistya

A Node-based SFTP with integrated REST API for querying users, files, etc...

Something I've been working on recently:http://ift.tt/2wQwYKV's a Node-based SFTP server with an integrated REST API for querying users, files, etc... The authentication strategy is customizable via a callback that you pass in when instantiating the service. Various events of interest are emitted (file uploaded, user signed in, etc...).My use case: I have a number of clients that need to routinely send me various data feeds for further processing. The industry is such that everyone has pretty much standardized on SFTP (they don't want to interact with a custom REST API). I wanted something that provided a simple solution for implementing a custom authentication strategy and that was capable of pinging additional third-party services as uploads occur (to trigger automated processing).I'd estimate that the SFTP server portion of the project is ~90% complete. There are a few SFTP commands that I've yet to implement (LSTAT, etc...). There's also a bug when you attempt to upload a file to a subdirectory that you create (it's always uploaded to the root path of the user's folder).REST API endpoints exist for providing a basic health-check and querying for a list of users. I've yet to implement REST endpoints for querying / fetching files, but that part is easy in comparison to aspects that have already been implemented. I plan on getting those calls fleshed out later this weekend or on Monday.I hope some others find this useful. PRs are of course welcome.

Submitted September 09, 2017 at 05:38PM by sotimting

🌎 Political boundaries of the entire world in GeoJSON format [Click on the map to browse][Leave a star to like]

http://ift.tt/2eNal06

Submitted September 09, 2017 at 10:47AM by simonepri

Friday 8 September 2017

a module that combines the processing power of your website's visitors to create a one large network that's capable of solving large complex problems.

http://ift.tt/2wPmWtr

Submitted September 09, 2017 at 04:53AM by TarekElwkeel

MongoDB and Node.js: How to begin (and why)

http://ift.tt/2weZxOK

Submitted September 08, 2017 at 10:54PM by nulless

Queueing Function Calls with Node.js and MongoDB

http://ift.tt/2gQfTaD

Submitted September 08, 2017 at 09:56PM by code_barbarian

JQuery wont load/work

Hey,I followed this tutorial to learn about node.js. The challenge I´m facing is that jQuery isn´t loading/working and I don´t see where I made a mistake in my code.Full code is on GitHub , here´s a code snippet displaying my ejs file:

You accessed ejs successfully

  • Item 1
  • Item 2
  • Item 3
  • Item 4
You can see the file structure on gitHub, it´s located in the same folder as the style.css. Could someone help me out and tell me, why jQuery isn´t laoding(I never installed it locally nor using npm since this isn´t necessary afaik)?

Submitted September 08, 2017 at 08:59PM by Fasyx

Do you know any opensource Headless CMS base on Nodejs?

Any recommendation? Thank guys

Submitted September 08, 2017 at 07:50PM by leekad

The initial implementation of ESM has landed in Node.js (module: Allow runMain to be ESM)

http://ift.tt/2wOPzFp

Submitted September 08, 2017 at 06:43PM by _bit

How can I test Typescript (.tsx) with a Typescript test

I've been working for days to try to figure out how to use mocha or jest to try to test typescript code. Nothing seems to be working right and all guides I find seem to be missing something important due to deprecation that I can't quite piece together. Can anyone give me step-by-step instructions on how this should be done?

Submitted September 08, 2017 at 03:21PM by CodeMonkey789

Node.js Weekly Update - 8 September

http://ift.tt/2gNNpyv

Submitted September 08, 2017 at 02:59PM by hfeeri

Announcing Yarn 1.0

http://ift.tt/2j8aZdo

Submitted September 08, 2017 at 02:54PM by hfeeri

RobotJS in games?

Hi, I'm trying to use NodeJS + RobotJS to create a basic bot that will run in a singleplayer indie game, using only arrow keys and two buttons (A + Z) I have tried using keyTap('down') and also attempted to use keyToggle(key, state) but neither work in the emulator, is there an equivalent to RobotJS that's more suited towards games?P.S. I'm not looking to cheat or release, just interested in how bots work with states etc.

Submitted September 08, 2017 at 02:21PM by MemoryPattern

I've been tidying up some npm modules. `mustache-file` lets you load mustache files and partials from disk in node.js and process them in one step. It's in production use on several sites so I think it's time to take it out of beta.

http://ift.tt/2j8YoGW

Submitted September 08, 2017 at 01:32PM by Sixes666

2017-09-05, Version 6.11.3 'Boron' (LTS),

http://ift.tt/2wE2QlH

Submitted September 08, 2017 at 01:45PM by hfeeri

NodeJS Beginner

Hello guys. I'm new to NodeJS, I'm using Express for back-end. As of now, I only know building basic api. I would like to ask for your suggestions/recommendations/tips on what other things Thank you in advance!

Submitted September 08, 2017 at 12:21PM by localdisknoob

Thursday 7 September 2017

Questrade.emit error

I am trying to use a package for Questrade which is a financial company. When I run my app.js file I get the error:Error: Unhandled "error" event. ([object Object]) at Questrade.emit (events.js:185:19) Now I get the error is not handled but looking at the docs I can not find out where or how I should include error handling. I used just the code from the section below the install to see if I could get it to work and nope not working at all. I have tried adding it on and can't figure out the right place or how. I'm a bit lost after a few hours of pounding my head.// Wait to login qt.on('ready', error, () => { if (error) { return console.log(error); } // Access your account here qt.getAccounts(); qt.getBalances(); });

Submitted September 07, 2017 at 10:45PM by business_for_life

Learn Complete Nodejs by building 12 projects

http://ift.tt/2uSMogH

Submitted September 07, 2017 at 08:32PM by myceleb

best practices for web sockets in 2017?

I have a scheduled service/task that updates my postgresql Database every 10 seconds with fresh data.I have a react app that shows this data and refreshes the browser every 10 seconds~. obviously not ideal and only doing this in development.what is the best practice as well as the simplest method of getting my Database data to appear on my frontend and refresh "live"?I know there's a lot of options like socket.io, sockjs, websockets, etc. etc.

Submitted September 07, 2017 at 06:46PM by sayurichick

Rise of FaaS: How we got from PHP to Node.js "Serverless"

http://ift.tt/2f5IpoL

Submitted September 07, 2017 at 06:29PM by keithwhor

The Node.js world is imploding

http://ift.tt/2eFCYMN

Submitted September 07, 2017 at 04:26PM by speckz

Developing RESTful APIs with Loopback

http://ift.tt/2j6oCKj

Submitted September 07, 2017 at 04:52PM by Ramirond

How can I return JSON with passport ?

I'm trying passport for the first time. I wrote this in the route file:app.post('/signup', passport.authenticate('signup')); In the passport config file I wrote this:passport.use('signup', new LocalStrategy({ usernameField: 'email', passwordField: 'password' }, (email, password, done) => { User.findOne({'email': email}, (err, user) => { if(err) done(err); if(user) return done(null, false, {'signupMessage': 'That email is already taken.'}); else { const newUser = new User(); newUser.email = email; newUser.password = newUser.generateHash(password); newUser.save((err) => { if(err) throw err; return done(null, newUser); }); } }); })); I want to respond the request with the error message json if needed and if the user is not taken to respond with the newUser as a json. How can I do that ? Thanks.

Submitted September 07, 2017 at 04:52PM by DogoCap