Tuesday 31 October 2017

A temporal fix to "npm does not support Node.js v9.0.0"

http://ift.tt/2A3rkEF

Submitted November 01, 2017 at 02:07AM by jonathanlinat

Question about Node+Passport social login and how it connects to Front End JS

I have a node js app with Google oAuth2.0 working via Passport.js. I can login/logout and I can grab User info and display it in my pug templates.The next thing I want to setup is socket.io for real-time comms.How do I identify who is logged in in the front end code where the socket.io client code would go?Basically I want the user to be able to log in, then chat/send messages as themselves to the server? What am I missing?How do I get to the user object that is created when the user is logged in? Session data? Cookies?Or do I need to handle Authentication completely differently?Thanks for your help.

Submitted November 01, 2017 at 01:59AM by b0z33

Question about handlebars and bootstrap tables

I managed to google my way into nodejs and mongodb(and learned hella lot in 4 days since I had 0 knowledge about it).But i'm having trouble populating bootstrap table with collection info.This is my code so far:
First name Last name Email Award description Award given date
It outputs everything I want,but not in correct way in table.What I'm trying to do is get everything in one row,but award description and award date for single user one under the other.Something like this: http://ift.tt/2ikQlDB anyone had the same problem I't would be very helpful.Thanks guys!

Submitted November 01, 2017 at 12:48AM by dotdotdev

Node v8.9.0 (LTS)

http://ift.tt/2h3Xlb7

Submitted October 31, 2017 at 08:35PM by dwaxe

Node v9.0.0 (Current)

http://ift.tt/2hrKeNP

Submitted October 31, 2017 at 08:35PM by dwaxe

Refactoring an old and broken library to using async/await with TDD

http://ift.tt/2lC1Db5

Submitted October 31, 2017 at 09:16PM by tanepiper

Newbie (to JS) developer questions: (1) Libraries over bulit-in methods and (2) ES6 features/syntax in public npm packages?

I'm developing a node package, a port of a Ruby* gem I've used and as I write it I find myself using many lodash methods: _.fromPairs, _.map, _.filter, _.toLower, _.includes, _.forEachI know most of these are already built-in into Javascript's "modern implementations" (I'm not even sure what being on MDN actually entails):Array.prototype.map()Array.prototype.filter()Map.prototype.forEach()String.prototype.includes()String.prototype.toLowerCase()(1) Why should I use or stop using lodash versions?The gem is originally a python library and it's been ported to Ruby and PHP to my knowledge. It's purpose is to detect gibberish: http://ift.tt/2zmhLnl Should I be concern about using ES6 features for a public npm package? Arrow functions, imports, spread operator: .... Do I need to run it through babel first?Thanks in advance for your help!

Submitted October 31, 2017 at 06:44PM by leonelgalan

[Help] Node.js - hikvision cam

I have hikvision cam and i want to link it with node.js at webpage then crop some pixel's from right and left how should this be done example : http://ift.tt/2iQkT3Q Thanks.

Submitted October 31, 2017 at 07:06PM by ahmedsaber9

Resolving a promise and writing some data to CSV, why are my rows writing to the file before my header?

Hey folks, I am currently trying to write a reddit scrapper so that I can learn Node. I am writing some backend code and I am used to synchronous code execution (I come from ruby/rails) so Node is throwing me off a bit.I am using snoowrap as my reddit API wrapper. I first query for my dailyThread and I attempt to resolve the returned promise so that I can grab some data and spit it out into a csv. The weird thing is that I append my header first and then the rows of data, but sometimes, my row of data appears before my header.i.e.fs.appendFile(filePath, header, (err)) gets called before fs.appendFile(filePath, row, (err), but row sometimes appear before header.What am I doing incorrectly? (Should I be making the entire thing synchronous and if so, would this defeat the whole purpose of using node/js?)In production apps, how do most companies/teams handle tasks that need to be synchronous? Are they just calling a service and having that service execute synchronously and letting Node just be a controller? Promise.resolve(dailyThread).then(result => { let threadId = result[0].id console.log(threadId) reddit.getSubmission(threadId).expandReplies({limit: Infinity, depth: 1}).then(thread => { let threadName = 'Daily General Discussion - ' + date let subreddit = 'ethtrader' let header = "threadDate, score, body, sourceId, subreddit, threadName \r\n" let filePath = `csv/reddit_${dateFile}.csv` try { if(fs.openSync(filePath,'r')) return } catch (err) { fs.appendFile(filePath, header, (err) => { if (err) throw err console.log('Write Header:' + threadId) }) let mapping; mapping = thread.comments.map(c =>{ let body = c.body.replace(/(?:\r\n|\r|\n)/g, ''); let score = c.score let sourceId = c.id let row = date + ", " + score + ", " + body + ", " + sourceId + ", " + subreddit + ", " + threadName + "\r\n" fs.appendFile(filePath, row, (err) => { if (err) throw err console.log('Write Row:' + sourceId) }) }) } }) })

Submitted October 31, 2017 at 04:15PM by Guy-Lambo

Node.js 8 Moves into Long-Term Support and Node.js 9 Becomes the New Current Release Line

http://ift.tt/2xFXQeJ

Submitted October 31, 2017 at 04:20PM by _bit

Which ORM do you recommend for SQL databases?

Context: I've been using Knex to fetch data from databases for quite a while now and while it's a great tool, I am now looking to try something more opinionated like an ORM.The built-in features I am looking for the most are:Schema definition;Schema validation;Migrations;Support for underscore table/column names;Easy way to write Raw Queries or Raw Where statements when needed.Things I don't mind/don't use much:Slow learning curve;Difficult setup;Transactions;Hooks/Events.From what I saw the options are very limited. Sequelize seems to be the standard but a lot of people complain of its bloat. Bookshelf seems nice but it's going through some problems and development has slowed down. No opinions on Objection.js yet (please comment if you have some!).What do you guys and girls use and recommend these days and why? Any opinions will help.

Submitted October 31, 2017 at 02:15PM by xenopticon

Build a "Serverless" Reddit Bot in 3 Steps with Node.js and StdLib Sourcecode

http://ift.tt/2zTOBs5

Submitted October 31, 2017 at 02:33PM by keithwhor

Need advice: sending email reminders on a daily basis

Building something that will send a daily email reminder at a user-specified time and not sure how best to do that. The two options I was considering:Build a cron job for each individual user, and allow them to specify the reminder time down to the minuteBuild a cron job for every hour of the day that batch sends emails, only allow users to select reminder times in hourly incrementsHaving a ton of cron jobs seems like it would become a nightmare, but I've never worked with them before so maybe not?Secondarily, I was planning on using either node-crontab for building actual cron jobs via node, or later.js for similar functionality but from node. Am I correct in thinking that building actual cron jobs is more robust in that if my app crashes, as long as the server is still up the emails will still be sent?Edit: Forgot the node-specific details.

Submitted October 31, 2017 at 12:46PM by wntrmut3

NPM module to parse latest trending hashtag by country name (my first npm module)

http://ift.tt/2hpCr3j

Submitted October 31, 2017 at 09:52AM by vapeisgood

Monday 30 October 2017

OpenSSL update, 1.0.2m

http://ift.tt/2igLao9

Submitted October 31, 2017 at 03:17AM by dwaxe

Server & Authentication Basics: Express, Sessions, Passport, and cURL

http://ift.tt/2xBPjJC

Submitted October 31, 2017 at 01:59AM by evangow

Hey everyone, I created this npm package to handle the annoying things most people run into when creating applications and could be useful check it out.

http://ift.tt/2iMTJe7

Submitted October 31, 2017 at 02:11AM by andreGarvin1

Basically an open source version of heroku

https://www.youtube.com/watch?v=576RsaocNUE&feature=youtu.be

Submitted October 31, 2017 at 01:07AM by kasra85

Beginner needs help with NodeJS and MongoDB

Hey everyone.I started learning Node by building simple user management system.My user model looks like this:var employeeSchema = new Schema({ firstName: {type: String,required:true}, lastName: {type: String,required:true}, email: {type:String,required:true}, awards:[ { description:String, date:Date } ] }); I print the values with handlebars: etc,but how do i print the awards elements?Also,i try to put the values of this model in bootstrap tables,but can't do that,in my left i have table which is empty,and in my right part of screen i have printed values but not in table?bootstrap part:
First Name Last Name Email


Submitted October 31, 2017 at 12:29AM by dotdotdev

How To Create A Real - Time Chat App Using React.Js Node.Js And Socket.Io

http://ift.tt/2z6aE1i

Submitted October 31, 2017 at 12:36AM by AntonioErdeljac

Rivet: An npm package for helping you keep your apis and clients in sync.

http://ift.tt/2zju6sC

Submitted October 30, 2017 at 10:58PM by vikinghug

Last Week in Node.js Working Groups - October 22

http://ift.tt/2z3G7Bm

Submitted October 30, 2017 at 08:20PM by _bit

Examples of an ideal file structure/application layout for an Express app?

Currently I have all of my routes /routes, then frontend/css and so on. Just after some opinions on how others may do it.

Submitted October 30, 2017 at 06:16PM by OzziePeck

Anyone going to Nodevember in Nashville this year?

http://nodevember.org/

Submitted October 30, 2017 at 04:08PM by headyyeti

Xmysql: One command to generate REST APIs for any MySql Database

http://ift.tt/2zPLFg7

Submitted October 30, 2017 at 04:21PM by o1lab

Should I use a generator for my REST API?

Hello, I am building an app using Express and Vue.js. I am pretty new to Node although I built some enterprise app with React.js. I am thinking of using this generator to kickstart my app:http://ift.tt/2gZwwot it any good? Is it updated? Should I go from scratch? Thanks!

Submitted October 30, 2017 at 03:00PM by LC2712

Best practice for multiple setInterval

Hi there! I wrote a program which collects frequent information form several places. All in all there are about 10 functions which are called using the setInterval-Function. The interval is between 10 and 300 seconds. None of them is really time-critical and every iteration is finished long before the next call, so it just works fine.But I'd like to know what's the best practice. Should I set up one setInterval with 10 seconds and check the time between the function calls or are more setInterval-Functions the way to go and why.

Submitted October 30, 2017 at 02:32PM by tasKinman

Simple notes app using Koa on the backend and Vue on the front-end. Features MySQL integration, user authentication, CRUD note actions, and async/await. MIT license.

http://ift.tt/2w3qoyR

Submitted October 30, 2017 at 01:05PM by adstwlearn

Hackaton Project - Office Control Panel

Hello there!I built a little project for an Hackaton, and I'd like to have some feedback from you guys! What you would have done differently?Signin off, Francesco

Submitted October 30, 2017 at 11:26AM by DrSghe

Hackaton Project - Office Control Panel

Hello there!I built a little project for an Hackaton, and I'd like to have some feedback from you guys! What you would have done differently?Signin off, Francesco

Submitted October 30, 2017 at 11:42AM by DrSghe

Lightweight job scheduling for Node.js

http://ift.tt/2gbcTZJ

Submitted October 30, 2017 at 08:32AM by indatawetrust

4 + 1 ways for making HTTP requests with Node.js: async/await edition

http://ift.tt/2yWOSgQ

Submitted October 30, 2017 at 08:46AM by GitW_85

Sunday 29 October 2017

Issues with getting Pixi to work in Node.

Pm2 with Forever

I am wondering how Pm2 and forever interact? Is it possible to set Pm2 up then run Forever on top of that so when it crashes it reboots? Or am I way off base on what I am try to do

Submitted October 29, 2017 at 11:56PM by jsdfkljdsafdsu980p

Next Level Webpack Dashboard

http://ift.tt/2yVoOAb

Submitted October 29, 2017 at 08:43PM by thickoat

Running Node.js on WSL from Visual Studio Code

http://ift.tt/2gIkqwe

Submitted October 29, 2017 at 07:57PM by fullstackdelivery

Adding dependency best practices

Hi guys, I am using webpack to bundle everything into one file, and my project is using jQuery. But right now I am confused whether I should put jQuery into devDependencies or dependencies, since I am using webpack and everything will be packed into one file anyways and both will work perfectly. What’s the best practice here? Thanks!

Submitted October 29, 2017 at 08:16PM by laonawuli

NPM dependency question

Hi guys, I am trying to figure out how npm dependency works and got a question while installing a package called webpack-stream. So in its package.json, I saw webpack is listed as a dependency. So i am assuming there should be a webpack in webpack-stream’s node_modules folder — but actually no, after I installed the webpack-stream, webpack is actually installed in my root folder’s node_modules folder. Shouldn’t it be in webpack-stream/node_modules? Thanks in advance!

Submitted October 29, 2017 at 06:19PM by laonawuli

How do you make multer save the file in a folder?

I'm having trouble using multer to save a photo in a folder. The path of the file would be uploaded to mlab (working fine), but its supposed to grab the image from the folder I want it to grab it from, which is just not saving. When trying to look at it from the view, it throws a 404 error, due to the picture not being present in the folder. Here's my server-side controller:var multer = require('multer'); var storage = multer.diskStorage({ destination: function (req, file, cb) { cb(null, './modules/articles/client/img/'); // where to store it }, filename: function (req, file, cb) { if(!file.originalname.match(/\.(png|jpg|jpeg|pdf|gif)$/)) { //console.log("filename error"); var err = new Error(); err.code = 'filetype'; // to check on file type return cb(err); } else { //console.log("produced filename"); var day = new Date(); var d = day.getDay(); var h = day.getHours(); var fileNamee = d + '_' + h + '_' + file.originalname; console.log("filename produced is: " + fileNamee); cb(null, fileNamee); } } }); var upload = multer({ storage: storage, limits: { fileSize: 20971520 } // Max file size: 20MB }).single('myfile'); // name in form exports.uploads = function (req, res) { //console.log("in uploads"); upload(req, res, function (err) { if (err) { if (err.code === 'LIMIT_FILE_SIZE') { res.json({ success: false, message: 'File size is too large. Max limit is 20MB' }); } else if (err.code === 'filetype') { res.json({ success: false, message: 'File type is invalid. Accepted types are .png/.jpg/.jpeg/.pdf' }); } else { console.log('err = ' + err); res.json({ success: false, message: 'File was not able to be uploaded' }); } } else { if (!req.file) { //console.log("reached here with !rep.file"); var article = new Article(req.body); article.user = req.user; article.save(function (err) { if (err) { return res.status(400).send({ message: errorHandler.getErrorMessage(err) }); } else { res.jsonp(article); } }); } else if (req.file) { //console.log("reached here with req.file"); res.json({ success: true, message: 'File was uploaded!' }); } } // Everything went fine }); }; The img folder has chmod 755 whereas the server-side controller has chmod 644 (-rw-r--r--). I will say that if I throw print statements in the middle of the exports.upload functions and the filename function, nothing prints out. Does it have to do something with not being called? I'm kinda new working to MeanJS

Submitted October 29, 2017 at 06:31PM by AndroidGuru7

Should I use only POST and GET or use methodoveride in ExpressJS?

Hello guys.Imagine I have a todo list and I want to delete or edit one of the todo items.Every todo item has an delete button next to it. Should this delete button be wrapped with the form which will be doing DELETE operation with the help of the methodoverride package or is it alright to make it a link with a href that has a route inside of it and at the end the ID of the todo item? Like "href='todos/delete/123'" and then in the backend have the route for deletion like "todos/delete/:id" and directly delete it once a user click on that link?Also for editing, is it okay to use POST in the form to edit todo?Are there any benefits of using methodoverride and it's PUT and DELETE over only POST without methodoverride? :)Thanks :)

Submitted October 29, 2017 at 04:20PM by nikola1970

Creating a http2 static file server with nodejs (with examples)

http://ift.tt/2yVNQBC

Submitted October 29, 2017 at 01:30PM by RatulSaha_

Ampify: Automatically convert plain HTML to Google Accelerated Mobile Pages format

http://ift.tt/2lbCMuy

Submitted October 29, 2017 at 10:41AM by fagnerbrack

Saturday 28 October 2017

Building a Budget Manager with Vue.js and Node.js (Part III)

http://ift.tt/2yWeAjk

Submitted October 29, 2017 at 02:43AM by Shiintapix

Does anyone know the most stable npm version out rn? One will least issues

No text found

Submitted October 28, 2017 at 09:24PM by Tezzy_Bo

Continuous Integration with Node, Semaphore, and Semantic-Release

http://ift.tt/2zf2qEZ

Submitted October 28, 2017 at 05:08PM by jeremyoverman

Learn how to: Build a RN + Redux Cryptocurrency App — Chapter I

http://ift.tt/2gdBQR0

Submitted October 28, 2017 at 12:36PM by thickoat

Express-generator, Socket.io Event issuing multiple times.

Hi All,I have create a node app using express generator. I have integrated socket.io in the application. Since express generator has their own way of creating express server i have followed this procedure to successfully integrate the Socket connection with listening server and made the io available throughout the application via res.io instance.But the problem is when i m emitting an event as shown below. My client is reading the data multiple times. var clients = 0; var nsp = res.io.of('/default-namespace'); nsp.on('connection', function (socket) { clients++; console.log(clients + ' clients connected!'); socket.on('disconnect', (reason) => { clients--; console.log(clients + ' clients connected!'); }); nsp.emit("socketToMe", "New User connected. Current clients:"+ clients); }); My listener has the following code: var socket = io('/default-namespace'); socket.on('socketToMe', function (data) { $('#data-div').append($('
  • ').text(data)); }); Whenever i refresh the browser in another instance like incoginito my main browser is showing multiple events for the data. Like thisNew User connected. Current clients:1 New User connected. Current clients:2 New User connected. Current clients:1 New User connected. Current clients:2 New User connected. Current clients:1 New User connected. Current clients:1 Not sure what is wrong. Can anyone help me on this?

    Submitted October 28, 2017 at 10:31AM by 20CharactersLong

Journey to ES6 and Beyond

http://ift.tt/2hgpYyI

Submitted October 28, 2017 at 06:53AM by kamranahmed_se

What is Event Loop in Nodejs

I was searching over the internet that how actually Nodejs event loop is working, I saw different videos on YouTube and read different articles but they are not clear to me.Following are my basic questions:What is Event Loop in Node.js and how does it actually works?What is thread pool?Does Node.js uses multiple threads?

Submitted October 28, 2017 at 06:55AM by abdulsamad22

Friday 27 October 2017

push in the right direction? I want to make something like Burp Suite or Tamper Data in Electron and Node.js

http://ift.tt/2iaqK01

Submitted October 28, 2017 at 06:27AM by jimcola99

Everything You Need to Know About Node.js Event Loop (Outside In)

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

Submitted October 28, 2017 at 02:28AM by fagnerbrack

Getting results from a paginated API (shopify)

How would one go about looping through both pages of an API and logging them in a single JSON http://ift.tt/2zLM2s3 (products 1-250) http://ift.tt/2gIRZhM (products 250-500)

Submitted October 27, 2017 at 11:07PM by cali_ZX6R

Help Express Validator with App.route

Can I get help with what I'm doing wrong here ? Also is there a node slack channel ?app.route('/laundromats', [ check('name', 'Invalid name') check('address', 'Invalid address').notEmpty().isAlpha() check('email', 'Invalid email').isEmail() check('phone', 'Invalid phone #').isMobilePhone() check('password', 'Invalid').notEmpty().isAlpha() ]) .post( function (req, res, next){ const errors = req.validationErrors() if (errors) { return res.status(422).json( errors: errors.mapped()) } const laudry = matchedData(req) res.json(laundry) })

Submitted October 27, 2017 at 10:34PM by chabv

Simple Fullstack GraphQL Application built with Node + Express + Sequelize + React + Redux

http://ift.tt/2xY3Nri

Submitted October 27, 2017 at 10:22PM by atulmy

[Advice]How to give a file that's not text?

I've been doing: fs.readFile(filename, function(err, data){ if (err) throw err; response.writeHead(200, {'Content-Type': 'image/jpg'}); //response.write('

'+ data +'

'); PRODUCES WRITE AFTER END ERROR response.end(data); }); console.log('looks like it went through this code and did absolutely nothing!!!!\n'); Like the log says it doesn't seem to do anything and throws no errors. What gives?

Submitted October 27, 2017 at 08:31PM by ImpatientTomato

Build Your Node.js Application in a Modular Way - DZone Web Dev

http://ift.tt/2zK0b8R

Submitted October 27, 2017 at 07:34PM by pmz

Going Serverless | AWS Lambda and Kinesis streams at busuu

http://ift.tt/2zJqdt7

Submitted October 27, 2017 at 05:14PM by hidiegomariani

Node.js Weekly Update - October 27

http://ift.tt/2iEo12E

Submitted October 27, 2017 at 04:27PM by andreapapp

Ode to flow-runtime; one (relatively unknown) project that everyone should be using

http://ift.tt/2yQIYeS

Submitted October 27, 2017 at 03:09PM by gajus0

Node Project Skeleton

http://ift.tt/2xopCft

Submitted October 27, 2017 at 10:16AM by jonathasrr

MorphlingJS - Node+docker based CLI mocks any swagger with autogenerated data, route persistence and more.

http://ift.tt/2i8I7yi

Submitted October 27, 2017 at 10:45AM by Psykopatik

First Time writing an Api that actually powers something

http://ift.tt/2i94rYu

Submitted October 27, 2017 at 08:08AM by francishero

Thursday 26 October 2017

WebSocket & Node.js Cluster. Fast & Easy way to create node.js workers with uWS websocket. Very small library server is less than 15 kb (not minified) client is less than 7kb (minified, not gzip)

http://ift.tt/2ybO8nL

Submitted October 27, 2017 at 05:22AM by goriunovd

What is the best node training webcasts site?

I'm coming from PHP, so I'm looking for.somthing like laracasts.com but focused on node / JavaScript.

Submitted October 27, 2017 at 01:38AM by Incraigulous

Express/API servers manager

I'm currently writing several different API endpoints each which I would like to deploy possibly on different ports on the same machine or different machines altogether. I'm looking for a manager type of service which allows me to deploy all these API servers and even do some management to them. Logging, restarting, shutting down, maybe some testing. At first glance, I thought Loopback was the answer but quickly realized it was just one gigantic API server. I was wondering if anyone could recommend some solutions for this?

Submitted October 26, 2017 at 11:08PM by nocturnal316

Scaffold APIs with Express and Swagger

I released a new version of generator-express-no-stress. It's the first release with a community contributed PR!! Woop!Check it out here: http://ift.tt/2gMBzbJ's what it does: The generator scaffolds a new project and includes API validation, interactive API documentation, structured logging, ES.next, and a transpilation pipeline.

Submitted October 26, 2017 at 10:51PM by coracarm

Is there any e-commerce node.js web applications that are open source and stand out amongst others?

Looking for an e-commerce node.js web app that can handle selling typical products and have Xero integration.

Submitted October 26, 2017 at 09:58PM by InsertCoinPushStart

What's New in Mongoose 4.12: Errors for Custom Query Functions

http://ift.tt/2gG9QG8

Submitted October 26, 2017 at 08:49PM by code_barbarian

Lookenv: Set rules for the environment variables. Works with dotenv

http://ift.tt/2yRaL0y

Submitted October 26, 2017 at 08:59PM by diegomura

[Advice] How to give files back?

I'm trying to give a file that someone types as path in the url. I have some thing like:else if (regex.test(theURL)) { //checks if filename is valid var test = giveFILE(filename); if (test==1){ //filetype=mp3 var song = fs.readFile('/' +filename); response.writeHead(200, {'Content-Type': 'audio/mp3'}); response.end(song, 'binary'); } else if (test==2){ //filetype=jpg console.log('after regex filename: '+ filename); var img = fs.readFile(filename); response.writeHead(200, {'Content-Type': 'image/jpg'}); response.end(img, 'binary'); } else if (test==3){ fs.readFile(filename, function(err, data) { // error handling if the url is bad if (err) { response.writeHead(403, {'Content-Type': 'text/html'}); return response.end("403 Not Found");}}); } } I struggling with this. Why won't it give me the file I want? I have the right filename format.

Submitted October 26, 2017 at 08:07PM by ImpatientTomato

The difference between Node and JavaScript and Node's underlying fundamentals

http://ift.tt/2yOlO8L

Submitted October 26, 2017 at 07:10PM by treyhuffine

Node.js Events EventEmitter Tutorial Example From Scratch

http://ift.tt/2yEaoqE

Submitted October 26, 2017 at 06:27PM by KrunalLathiya

What to do when installing a package through npm fails with these kinds of errors?

32 bit windows here. I didn't experience this on 64 bit, not saying that's what the problem is.PS C:\Users\me\my-purescript> npm install -g purescript C:\Users\me\AppData\Roaming\npm\purs -> C:\Users\me\AppData\Roaming\npm\node_modules\purescript\bin\purs.js > purescript@0.11.6 postinstall C:\Users\me\AppData\Roaming\npm\node_modules\purescript > node lib/install.js internal/child_process.js:328 throw errnoException(err, 'spawn'); ^ Error: spawn UNKNOWN at exports._errnoException (util.js:1020:11) at ChildProcess.spawn (internal/child_process.js:328:11) at exports.spawn (child_process.js:369:9) at C:\Users\me\AppData\Roaming\npm\node_modules\purescript\node_modules\bin-check\index.js:22:12 at C:\Users\me\AppData\Roaming\npm\node_modules\purescript\node_modules\executable\index.js:27:4 at FSReqWrap.oncomplete (fs.js:123:15) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! purescript@0.11.6 postinstall: `node lib/install.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the purescript@0.11.6 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\me\AppData\Roaming\npm-cache\_logs\2017-10-26T17_36_46_284Z-debug.log

Submitted October 26, 2017 at 06:42PM by ForrestTrump

Node.js development: functions vs classes

So, the title is straightforward: since classes have been supported in node.js for quite some time now, how have you been adopting them? Do you still rely on functions, or do you include classes? I've been working on a project lately and found myself split between classes and functions. Some parts of the app I did with just functions, other parts I did with modules and it got me thinking, is there a rule? I suppose that pretty much everything you can do with a class you can do with a module / functions. What are your practices, recommendations?

Submitted October 26, 2017 at 05:49PM by JavascriptFanboy

Tutorial: How to use reduce function

http://ift.tt/2gAjbiC

Submitted October 26, 2017 at 03:39PM by srdjan_sukara

How to connect to multiple node.js servers with SSL?

I am developing a multiplayer browser game where the user can select which server to connect to.Every server will be a separate Cloud machine with node.js installed. For the client side, I am using C#.The connection to the servers will be made via socket.io. Every server will have a separate SSL certificate.What is the best way to connect the client to one of the servers at runtime? It also needs to be secure - no connections from outer clients.

Submitted October 26, 2017 at 04:34PM by bobonik

Installing submodules with npm?

I am wanting to use an experimental feature of react called react-call-return. Install react using npm i react@latest doesn't include react-call-return.How can I pull the package from the react repo and use it in my current react project? Is it possible with npm?Initially I cloned the react repo and copied the react-call-return package to my lib/ directory but I have a feeling that's just a bad idea and there's a "better" way to do this.Is there a way to install this submodule with npm?

Submitted October 26, 2017 at 01:20PM by VeryOldFilms

hapi against the world

http://ift.tt/2yPkrXt

Submitted October 26, 2017 at 12:06PM by xenopticon

StdLib Updates: Functions Run on Node 8.8.0, Access Control List Support

http://ift.tt/2xqxrBd

Submitted October 26, 2017 at 09:04AM by J-Kob

Wednesday 25 October 2017

Repository and Slides to learn how to develop and publish your first npm package

http://ift.tt/2y5WIFq

Submitted October 26, 2017 at 12:13AM by big_lunch

How to compare 2 API's?

I am building an inventory update app using node and express. I am getting JSON data from 2 sources (shopify API & our ERP's API). I need to match the SKU# from both sources and then POST the updated inventory back to shopify. How would one go about matching skus so the right inventory goes with the right product?

Submitted October 25, 2017 at 09:40PM by cali_ZX6R

[Question]How would a job scheduler and Job queue go together ?

I guess this is more like an architecture/design kind of question .to demonstrate the problem let's assume we want to implement abandoned cart emails , we would like to send customers 3 emails with time windows of 1 ,2 and 3 hours.so the work flow looks like this :1-check every hour for abandoned carts2-if any,set three timers with required time windowsfor #1 i'm using node-schedule a cron-like job schedule for nodeand #2 i'm using kue a priority job queue backed by redis,//script 1 schedule.scheduleJob ('* 1 * * * *', ()=>{ let abandoned = await store.getAbandonedcheckouts (); if (abandoned.length){ abandoned.forEach(checkout=>{ var job = queue.create('abandoned', { email:checkout.email }).delay(60*60*1000).save() var job = queue.create('abandoned', { email:checkout.email }).delay( 2*60*60*1000).save() var job = queue.create('abandoned', { email:checkout.email }).delay( 3*60*60*1000).save() }) } }); with jobs being defined like: //script 2 queue.process('abandoned', function(job, done){ /* check if the checkout is still abandoned,if so sent an email */ }); Now my questions are :1-Am I using the correct tools to do this ?2-Should script #1 #2 be required by app.js script ? or should the run on their own with something like node script1.js?any better way to do this ?somehow this way seems a bit messy to meThanks in advance.

Submitted October 25, 2017 at 10:12PM by 10701220

Microsoft’s Napa.js adds multithreading to Node.js

http://ift.tt/2zvRBdW

Submitted October 25, 2017 at 03:58PM by lonniebiz

Node.js Security Release Summary - October 2017

http://ift.tt/2gGG6wp

Submitted October 25, 2017 at 03:04PM by _bit

Adonis JS + SPA

Hi!what is the best way to serve a SPA with Adonis Js ?

Submitted October 25, 2017 at 03:15PM by ferprez

[Newbie] - Is windows server a good opption as nodejs server?

What're your thougts?

Submitted October 25, 2017 at 01:08PM by Revlack_br

Express includes bodyParser as default

http://ift.tt/2yJseIQ

Submitted October 25, 2017 at 10:41AM by zigzeira

C3.js | D3-based reusable chart library

http://c3js.org/

Submitted October 25, 2017 at 09:40AM by indatawetrust

Job Search Tips

For the people currently working as node.js dev's what do you recommend someone starting should do. I have been recently developing my API's using Swift. Just started Job searching. The projects I highlight were all done in Swift for backend shit. I learnt Node.js in 2015. So to land Node.js or backend should I rewrite some of the live projects back in Node.js. My assumption was if i'm pretty competent backend dev, then language won't matter that much. Seems companies are kinda rough(tough) or irrational on that.

Submitted October 25, 2017 at 07:05AM by chabv

Thoughts on using client/server Javascript(TS)?

Hi everyone I'm web developper and in my Company we are thinking about moving from Java.We are small team (8/9) with lot of différents specific projects (mobile, web ...)I really like client/server Javascript, probably with typescript. I see lot of avantages :Our team only need one langage, it will ne easier for developer too switch from one project To another.We can share libraires between client and serverTooling (eslint), test units, deployments ... Will be easier.We can create mobile, web, desktop app with the same code base (react native, electron)I don't see lot of cons, did i Forget anything ? What are your pro/cons about it ?Thank's

Submitted October 25, 2017 at 07:53AM by nicolasb53

Here come a new challenger !!

Hi guys, just saw that Microsoft is releasing for free and opensourced their own NodeJS complement/alternative engine: http://ift.tt/2gH1SQQ it’s multi-threading for JS allowing to achieve HPC with JS.What do you think of!?

Submitted October 25, 2017 at 08:29AM by Plum0

Tuesday 24 October 2017

For Developers, Ego is the Enemy

http://ift.tt/2kYG843

Submitted October 25, 2017 at 03:59AM by 73mp74710n

Create REST APIs using LoopBack - IBM Code

http://ift.tt/2xkIrjy

Submitted October 25, 2017 at 12:47AM by jcasman

Node v4.8.5 (Maintenance)

http://ift.tt/2h5SFhD

Submitted October 24, 2017 at 11:26PM by dwaxe

Node v6.11.5 (LTS)

http://ift.tt/2h57IrR

Submitted October 24, 2017 at 11:26PM by dwaxe

Node v8.8.0 (Current)

http://ift.tt/2h5vPXy

Submitted October 24, 2017 at 11:26PM by dwaxe

Do I still need a .js file when using pug/jade?

Two questions.Can I do everything in .pug that I can do in .js?Currently, I am doing ajax in my .js. I find that javascript codes in .pug are not showing up in browser developer tools. Is this true? Can people still see it if they try?

Submitted October 24, 2017 at 10:00PM by eggtart_prince

Iroh.js - Dynamic analysis tool - Intercept, record and analyze JavaScript at runtime

http://ift.tt/2gQ3t6q

Submitted October 24, 2017 at 10:19PM by Fuzz_Stati0n

Securing customer data with KMS and Envelope Encryption in Node.js

http://ift.tt/2h4CWiP

Submitted October 24, 2017 at 07:52PM by arendn

Identity server

Hi, I'm new here (and to node.js) and need a little help (or ideas):I want to create an central "identity server".It should have the following features:User-Management (store user information)Central login system (if an user clicks on a login button on any web app connected to this server, he should be redirecteed to a login page on this server, enter his credentials and (if authentication successfull) redircet to origin page)Application-Management (manage the connected webapps and their available permissions)Permission system (store user and group specific permissions for the specific applications)I'm not asking for code or something like this. I just don't now how to start, which framework to use or what needs to be considered.Can you help me? Do you have tipps for me?

Submitted October 24, 2017 at 07:26PM by Sparki2002

How to create a Trello.com Clone web app using Node.js

http://ift.tt/2zA1dUS

Submitted October 24, 2017 at 06:53PM by arthur_linov

Expressjs Authentication using Passport and MySQL

http://ift.tt/2ivznWJ

Submitted October 24, 2017 at 04:29PM by dxyz11343

CAC: Simple yet powerful framework for building command-line interface.

http://ift.tt/2i1rO6b

Submitted October 24, 2017 at 04:38PM by egoistian

Node Stream Image Operators

I have a little background and a couple questions. I'm doing this for learning reasons, and I'm trying to change to the more recent version of node streams.Caveat I don't think I need -v 8.x.xWhat I want to make - end goal - I'm planning to have a stream exported as a node module. So that anyone could drop it into their project and come out with image convulsions. What would be neat is you give a full color image to this module and you end up with a bunch or convulsions of said image. Then I'd like to spawn child process to run the convulsions through a FFNN or RNN then feed those out puts to a CNN structured network. Would be interesting to leverage the streams in a child process to train lower level networks to produce perceptrons for the overall CNN.Now the problem. When I stream an image.jpg into a readstream I have access to the chunks of data.ReadStream.read() will read all the data as it flows. But ReadStream.read(1) will read one byte at a time. Pause and then resume. How should I approach getting the hight and width of the image? Current image is 400x400 (planning on moving to 25x25, for simplicity and testing). I could make it a constructor argument. Or possibly run an fs.stats on the image to find the height and width?How should I go about accessing a near by pixel in a kernel convulsion? I was thinking I'd have to hash map the pixels and store most of the hash in memory untill the kernel is far enough away from the current position. Thinking x direction processing and y direction processing.My current approach is to hash map the top row of pixels ( planning to do a 3x3 kernel) and the row below the kernel. So that I have a 3x3 square to work with. Depending on the direction I may hash the columns.Now my issue is that the buffer in a stream only spits out chunks in sequence starting at position (0,0).Is there another approach besides hash mapping the the rows/columns of near by pixels?

Submitted October 24, 2017 at 02:36PM by TheOneRavenous

Using N|Solid with AppDynamics to Monitor Node.js Applications

http://ift.tt/2i06oqe

Submitted October 24, 2017 at 02:42PM by _bit

Node's Event Loop From the Inside Out

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

Submitted October 24, 2017 at 01:32PM by fagnerbrack

Babel still needed for Node v8.7.0, if I want to write in the latest ECMAscript style without missing anything important?

I'm using ESM modules with the --experimental-modules flag. There's async/await support for a long time now. Do I still have to use Babel in Node.js v8.7.0 if I want to write in the latest ECMAscript style? What can I miss?

Submitted October 24, 2017 at 11:26AM by DJviolin

Our Beginner Node.js Tutorials are now available in Russian too

http://ift.tt/2zLU5Wy

Submitted October 24, 2017 at 10:55AM by andreapapp

[OT]Podcasts anyone?

Hello there, I recently found the amazing world of podcasts and I was looking for some podcast concerning node, angular etc to hear... But there are so much of them!So, my question is: do you listen to any podcast? Which one do you think is the best one?Bonus question: which android client do you use?Cheers

Submitted October 24, 2017 at 08:41AM by DrSghe

express.Router not working?

I'm trying to separate my application in two parts: admin and common users, so i've separated my routes:routes/ admin.js index.js And in my app.js file, i've set it like this:var app = express(); app.use("/admin", require("./routes/admin")); app.use("/index", require("./routes/index")); In my navbar, i have something like this:
  • Which is a common user link. But when i try to access it, it gives me the "cannot get /index/lemas" message. If i go to "/lemas", it will work.The same will happen if i try to access "/admin/noticias/new". But if i go to "noticias/new", it will work. What am i doing wrong here?

    Submitted October 24, 2017 at 04:28AM by jonnymous

fully asynchronous, pure JavaScript implementation of the Parquet file format

http://ift.tt/2xM30Js

Submitted October 24, 2017 at 04:36AM by ikessler

Monday 23 October 2017

Hiring [US Remote] Senior Developer at Gamification Software Bit-Lever

We are looking to hire a full-time, remote Lead/Senior Developer for our Gamification software Bit-Lever.The platform was recently rebuilt using React/Redux on the frontend and Node/MongoDB on the backend. If it sounds fun to work with, it is! The codebase is built around developer happiness and as a Senior we expect you to contribute your own opinions and strategies that make building productive features easy for you.We are looking to fill this position immediately. Email me at lsalvatore@bit-lever.com with your resume and a paragraph about what you've been working on recently.The position would require a week of paid on-site training in Florida, but after that it is 100% remote. Unfortunately applicants from California or outside the US will not be considered.Thanks!

Submitted October 23, 2017 at 10:40PM by bit-lever

Last Week in Node.js Working Groups - October 15

http://ift.tt/2gwAMIh

Submitted October 23, 2017 at 09:46PM by _bit

I Successfully make Ajax call from React to Node. But res.redirect Not Working ?

On the client Side i make an ajax call to the node:const res = await axios.post('/api/stripe', toPost); where 'toPost' is an object with a bunch of key value pairs which I need on the backend.After doing a few bits on the backend I then want to redirect the user to the 'thank you' page. So I thought i could end the response with something as simple asres.redirect('/thankyou'); Although this shows up in the network tab on developer tools with status code 200. Nothing happens.Would be very grateful for any help.

Submitted October 23, 2017 at 05:53PM by harrydry

Using TypeScript for Public APIs in vanilla JS projects

http://ift.tt/2zK82nB

Submitted October 23, 2017 at 04:16PM by bidi82

5 Best Node JS eCommerce Platform for Entrepreneurs

http://ift.tt/2xYVrzT

Submitted October 23, 2017 at 03:43PM by sharonj15

Finding pkg: retrieve array of exports' name from file

I want to be able to display all exports from an import module.It needs to be able to get from node_modules and absolute path as well.I found this package http://ift.tt/2yIwE1D. But doesn't look like it looks into node_modules folder.given a module '@something/test'it can go to node_modules > @something > test > *looking at package.json* > navigate to the correct index.js file

Submitted October 23, 2017 at 03:24PM by jonyeezy7

Node.js Async Function Best Practices

http://ift.tt/2zHfWyl

Submitted October 23, 2017 at 02:57PM by gergelyke

Troubleshoot NodeJS script to pull HTML?

Hi can you guys help me troubleshoot this script?We are pulling the HTML status of different IPs but for some reason I get quite a few "001|undefined" results and I cant figure out why.. 001|undefined 001|undefined 001|undefined 001|undefined 001|undefined 303|173.21.42.45 303|152.215.152.123 303|133.20.52.111 var http = require('http'); var fs = require('fs') var ipArray; fs.readFile('PowerControllerIP.txt', 'utf8', function(err, data) { if (err) throw err; ipArray = data.split("\n"); for(i = 0; i < ipArray.length; i++){ var x = ipArray[i]; var req = http.get("http://"+ipArray[i], function(res,err) { console.log(res.statusCode + "|" + this.ipStr); }.bind({ipStr: x})).on('error', function(e) { console.log("001|" + e.address); }); req.setTimeout(30000, function(){ console.log("TimeOut|" + this.ipStr); }.bind({ipStr: x})); } });

Submitted October 23, 2017 at 01:38PM by UpYourQuality

A full-fledged Node.js runtime for Android and iOS. Support React Native

http://ift.tt/2wqNiSr

Submitted October 23, 2017 at 10:43AM by redgiant6157

How HomeAway uses Node.js to Scale Service

http://ift.tt/2gi7SeM

Submitted October 23, 2017 at 09:59AM by dobkin-1970

I just published my scientific work around modern web development choice

http://ift.tt/2z0PLpa

Submitted October 23, 2017 at 10:01AM by ScientificDeveloper

[Question] What do you use for non-persistent databases ?

Hello !I'm creating a web-app in NodeJS, and I need to store data from users currently on the website. I don't need to store anything else yet.Using something like MySQL might be easier, but should I empty it every time I start the server ? Isn't there something better ?Thanks !

Submitted October 23, 2017 at 08:30AM by Perdouille

Sunday 22 October 2017

Desperate for help: Socket.io over https

http://ift.tt/2guGI8e

Submitted October 22, 2017 at 11:07PM by Andreas0607

Twitter AI with Node.Js

http://ift.tt/2xYk9eI

Submitted October 22, 2017 at 11:04PM by StereoPT

Which higher-level framework? Feather/AdoniJS/Sails or something else?

Hello, I've tried Express. I've built my simple GET/POST api with Mongoose but when it comes the time for Authentication/File upload I'm lost. I'm not an expert and I don't know if I'm doing things in a correct way. I would like a more higher-level framework that already has an ORM, handles Authentication and makes me move fast.

Submitted October 22, 2017 at 10:12PM by justdash

Need help with a storage solution

Hello everyone, I am new to the scene in regards to developing in Angular4 using nodejs. I am building a web app that I have plans to deploy as a mobile app.It is a character manager for a tabletop game so I have a lot of data that I would like to store(spells, gear, skills, mods, add-ons, etc.) I have found that the best way to use this data is with JSON but I am not sure if I want to have a ton of JSON files in the fs. I thought about using a relational DB, but I am not sure what would work well on mobile.For reference, the data structure requires a lot of nested objects. for example, a character has a piece of equipment, that equipment has attributes and mods, mods have their own attributes and whatnot. and that can sometimes go many levels deep.Any suggestions are much appreciated

Submitted October 22, 2017 at 09:51PM by Midknightloki

Intro to a new powerful opensource JS framework that generates user interfaces using data models

http://ift.tt/2l9yyn9

Submitted October 22, 2017 at 07:24PM by astonio

[Question]Rescaling/resizing images that doesn't live on my server on the fly

I'm writing a messenger chatbot that would sometimes serve images that doesn't live on my server (from url)facebook generic template stays that the picture should be in 1.91:1 ratioUse the correct aspect ratio for your image. Photos in the generic template that aren't 1.91:1 will be scaled or cropped.one way to do this was to expose /image endpoint that would take three parameters url,width,height and resize the image to the specified dimensions by w ,hsomething like :app.get ('/image', function (req, res, next) { let url = decodeURI (req.query.url); Jimp.read (url, function (err, img) { if (err) throw err; img .resize (~~req.query.w, ~~req.query.h) .getBuffer (Jimp.AUTO, function (e, buffer) { if (e) throw e; res.writeHead (200, { 'Content-Type': 'image/jpeg', }); res.end (buffer); }); }); }); and then when i need to serve a picture I'd redirect to this endpoint to rescale the image as i wishHowever this approach doesn't seems to work not even on my dev because :1-facebook would ask for like 9 pictures at time2-since node is single threaded it will process the requests in order3-resizing an image seems to be CPU intensive and it does block the event loop4-when the requests times out facebook retries to send them and block the event loop even for longer time

Submitted October 22, 2017 at 12:33PM by 10701220

Hapi.js experts, what's your take on this?

So, I'm learning hapi.js and I have two books. When it comes to routing, or rather, code structuring they take two different approaches for the same thing.In the first book, they create routing in form of plugins. This is taken from the book:exports.register = function (server, options, next) { server.route({ method: 'GET', path: '/hello', handler: function (request, reply) { return reply('Hello World\n'); } }); next(); }; exports.register.attributes = { name: 'hello' }; However, in the second book, routing is just a regular node.js module:'use strict'; module.exports = [{ method: 'GET', path: '/api/recipes', handler: function (request, reply) { ... } }, { method: 'GET', path: '/api/recipes/{id}', handler: function (request, reply) { ... } }]; So, I'm a bit confused. What's the correct way here?

Submitted October 22, 2017 at 09:55AM by JavascriptFanboy

Saturday 21 October 2017

How efficient is pm2 for production ?

Hi everyone I am trying to run my project on server, i can not decide what i need to use. I am using pm2 and its working but i couldnt do benchmarks on my server. Is it effective enough for first time ?

Submitted October 22, 2017 at 01:03AM by btahtaci

Client and server in two different repos?

Hello, I am going with my first node+vuejs app. I have seen many examples and they have client+server in the same dir... which is probably not good for travisci and other tools. Also, I should duplicate all the tools filed (babel, eslint) in two dirs in the same repo. What's your opinion? http://ift.tt/2yxTI49

Submitted October 21, 2017 at 05:37PM by LC2712

2017/2018: Essential packages for an aspiring MERN developer?

I'm currently learning the MERN stack.If you were hiring a junior MERN developer, what packages would you want candidates to be proficient in working with? I've been working a lot with the basics--Mongoose, Express, the various Passport packages etc.--and want to start branching out and learning new packages.There was a similar thread a year ago, but things change quickly:http://ift.tt/2gXH7xd. I'll preemptively state that proficiency in vanilla js, algorithms etc., is essential, and that packages vary from project to project. That being said, surely there are some packages that you would hope your new hire has a handle on?

Submitted October 21, 2017 at 05:40PM by rollickingrube

What is your opinion on Adonis framework?

https://adonisjs.com

Submitted October 21, 2017 at 05:59PM by Incraigulous

V8 policy now is that no V8 commit can land if it breaks Node.js

https://mobile.twitter.com/trott/status/915624306750537728

Submitted October 21, 2017 at 03:19PM by fagnerbrack

Token based authentication in Node.js with Passport, JWT and bcrypt

http://ift.tt/2hV0A13

Submitted October 21, 2017 at 12:35PM by jonathasrr

A brief note from r/node moderators

TLDR: Nothing much is changing around here but please be cool and respect reddiquette.Hey fellow Redditors,It's been a bit high-drama here at r/node for the past couple of weeks. We have received messages asking us to comment on our moderation policy and to implement a code of conduct.As moderators, we discussed this internally and decided to wait until everything had cooled down before responding. With the drama no longer on the frontpage, that time is now. Some may be annoyed that this will be mostly a null response.At r/node we like to take a light-touch moderation approach when it comes to expressions of opinion. Regardless of whether the mods agree or disagree with opinions, we will generally allow them to be expressed. Please keep in mind the first two values of reddiquette when expressing your opinion:Remember the human.Adhere to the same standards of behavior online that you follow in real life.This is your subreddit. If you're sick of all the Node politics and wish to return to a subreddit of code and love and unicorns, then please use the powerful arrows to cast your vote and make the frontpage a place that reflects your interests and values.

Submitted October 04, 2017 at 12:13PM by bittered

[HELP] What is the best practice approach to avoiding race condition database code?

In this specific project I'm using knex.js (postgresql backed) and hapi.js.There are cases where I'm creating resource routes with dependents also created at the time of the request (multiple find or create patterns).I'm passing a transaction down through the calls.It doesn't seem to me that this "looks" good. I haven't seen any actual examples of production transaction code (hell, the only place you even see transactions commonly used are in transaction docs).I feel like I've been spoiled, having worked in the ActiveRecord world.Does anyone have any tips for writing safe database code?NOTE: Parameterized queries, and input scrubbing/validation are not the concern. I'm specifically asking about code that would introduce race bugs.

Submitted October 21, 2017 at 07:49AM by neonlibra

setup multi-domain SSL in Node.JS

http://ift.tt/2xci7YT

Submitted October 21, 2017 at 08:41AM by aliasgherlakkadshaw

Friday 20 October 2017

How to write a P2P chat app in Node.js by Mathias Buus

http://ift.tt/2l3Lpau

Submitted October 21, 2017 at 04:06AM by fagnerbrack

Joi info ??

Hello everyone, I was just seeing if anyone had some good documents or information on Joi .http://ift.tt/2yWuT2m

Submitted October 21, 2017 at 02:39AM by Blue_2525989

Embedding a Subset of One Archetype's Properties in another Archetype

http://ift.tt/2xUgYVz

Submitted October 21, 2017 at 01:00AM by code_barbarian

Difference between npm dot-env and dotenv?

Needing to circle back around and clean up some environment specific variables in my system. Going to use dotenv to do this. Upon googling though I see a "dotenv" and a "dot-env". Anyone know what the difference between these two are?I looked at the repo of "dot-env" and it seems like just a quick copy/paste job of "dotenv" that someone created for.... who knows what??

Submitted October 20, 2017 at 10:27PM by mansfall

Deploy your nextein site/blog with TravisCI and Now

http://ift.tt/2yD9nye

Submitted October 20, 2017 at 08:29PM by elmasse

Introduction to the Rate Limiting Policy with Express.js

http://ift.tt/2xbey5e

Submitted October 20, 2017 at 06:56PM by robotixs

Any examples with SQL Server connection and TypeScript?

Starting on a new project that is going to be using node with typescript. I was wondering if anyone knows of any examples or has any samples of this with connecting to SQL Server. It doesn't seem like there is much documentation out there, and we really don't have the option of using a different database type.I tried using mssql but when digging through the type definitions I haven't really been able to come up with a solid working example.

Submitted October 20, 2017 at 07:12PM by cwalsh2189

nodejs async/await problem

I've got an app that works fine on my local machine, but i can't get the production server (centos VPS) to accept async/await syntax. I have node 8.5.0 on both machines, and it's the exact same code. I've even tried using the 'enable-async' npm package on the server version, but still no love. Any ideas what I might be able to try next to get it working?edit: I've just discovered that it works fine if node isn't running as root. But I need it to run as root. What could be the reason that async throws errors only when run in root?

Submitted October 20, 2017 at 03:50AM by rEvolutionist3000

Bulk insert with trigger execution with mssql package?

I receive a student enrollments report a couple of times a week in a XLSX file that I parse using Node. It's currently writing just fine to my own local MongoDB instance; I've been rewriting it to write to our main SQL Server 2012 instance. For this I have imported the mssql package and am currently connecting to a dev instance of SQL Server 2012.On the SQL server, I have an INSTEAD OF INSERT trigger on this dbo.enrollments table; instead of just a blind insert, it uses a MERGE statement to see if a student is a new insert, or if a student isn't included in the most recent report/source input, meaning they're no longer enrolled in that particular course, and deletes them from the table if not matched within the source input. If a source entry is matched in the table, then an UPDATE statement is run instead.The script currently connects to and writes to the dbo.enrollments table just fine on first run. The problem is that the INSTEAD OF INSERT trigger on the server isn't firing when the script is run, so any students not included in the most recent report are still available from the enrollments table. In addition, I get a primary key error on my next script run because the MERGE statement in the trigger isn't being called to handle duplicate entries with an UPDATE statement.I do know why this is happening - the bulk insert method in the mssql package uses bcp behind the scenes, and by default bcp doesn't fire triggers unless the FIRE_TRIGGERS hint is specified from the command line.My problem is I don't know how to prompt my sql object to use that FIRE_TRIGGERS hint, or if I'm able to do that at all. I've checked the documentation for any config options and nothing I've seen would do the trick. I've also rewritten the function to use a long "INSERT INTO... VALUES..." statement, which also failed because there's a hard 1000-rows limit when inserting data (this current report has over 4000 rows; even if I denormalized the table and consolidated student entries I would still have over 1200 rows). I've also gone directly into the package and tried tracing the function call to see if I could add it manually and honestly just got totally lost.Google and Stack Overflow have not been of any help to me. Has anyone here had experience with this? Is there a method through which I can use NodeJS to tell bcp to use triggers when running a bulk insert on a table? Should I be using another package? Is there a config option I've completely missed? Any pointers would be appreciated.

Submitted October 20, 2017 at 06:10AM by trueFleet

Advanced user's authorizations (ACL) library for Node.js

http://ift.tt/2uINeJO

Submitted October 20, 2017 at 01:52PM by Atinux

A Brief History of Streams

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

Submitted October 20, 2017 at 02:17PM by ginger-julia

Build an eCommerce website with— Node.js, Vue 2, Stripe, Heroku and Amazon S3

http://ift.tt/2gTIGvf

Submitted October 20, 2017 at 03:17PM by connor11528

Node.JS Top 10 Articles - Oct 2017

http://ift.tt/2l2tjpx

Submitted October 20, 2017 at 08:41AM by mightbbest

Thursday 19 October 2017

Use OpenID Connect to Build a Simple Node.js Website

http://ift.tt/2yUYzgc

Submitted October 20, 2017 at 12:28AM by rdegges

RAM usage being all over the place

Hi there,I'm hosting a Discord bot + an Express server in the same process, RAM usage is all over the fucking place, and I'm not sure if it's that much of an issue. Basically, over the span of 5 minutes, my RAM usage climbs from ~210MB to ~410MB and then it resets back to 210 ish. http://ift.tt/2zCf3H9 Project is here, if anyone wants to take a look: http://ift.tt/2x8X61k don't think it's a memory leak though - because after a few moments, the RAM resets back to where it should be. It's not a steady climb. Anyone have any idea what this could be caused by? Or can I just chalk it up to node being silly sometimes?I'm also open to other suggestions / improvements.

Submitted October 19, 2017 at 09:19PM by Dynamexia

Node Firebird driver node-firebird 0.8.4 is released with Typescript definition file

http://ift.tt/2zvgCGJ

Submitted October 19, 2017 at 08:32PM by mariuz

A library for printing clean callstacks supplied with source code lines (+full sourcemap support)

http://ift.tt/2fy5L9V

Submitted October 19, 2017 at 07:03PM by xplozive

I am learning Node by building a web app that builds other web apps with SSH & headless Chrome

http://ift.tt/2vWDjSb

Submitted October 19, 2017 at 04:38PM by MrOCDx3

Running the commands it suggests doesn't do anything.

http://ift.tt/2yV0CRA

Submitted October 19, 2017 at 02:38PM by vinsneezel

Is Swagger "worth it"?

So I've read a lot about it and tried it a bit. I've been trying to use swagger with express.js and from what I've seen, the generated project really limits the express.js capabilities. There are no routes anymore, it's all taken care of by swagger. This is pretty interesting to me, since I thought swagger was just used for documenting the API, not really about the structure. But it does influence the structure of the app.So, has anyone worked with swagger + expressjs? Is learning the new "language" worth it in the end?

Submitted October 19, 2017 at 03:19PM by JavascriptFanboy

Returning a stream from an async function

I'm writing a function right now that returns a stream. But I just realized I need to do some async work before I return the stream (I need to connect to Consul to find the address of the server I'm going to fetch some data from).So this used to be:import pump from 'pump'; import JSONStream from 'JSONStream'; getResponses() { const answer = new JSONStream.parse('*'); pump(request({uri: 'http://server/responses'}), answer); return answer } and this was nice and simple, but now I'm going to do an async call which means this function now has to take a callback or return a Promise which resolves to the stream. This seems kind of weird to me, because streams and Promises are two different async constructs, and it feels wrong to be mixing them. So I could do:getResponses() { const answer = new Transform({ objectMode: true, transform(chunk, encoding, callback) {callback(null, chunk);} }); distributed.findService('api') .then( apiService => { pump( request({uri: `http://ift.tt/2gsL3sA`}), new JSONStream.parse('*'), answer ); }, err => { answer.destroy(err); } ); return answer; } Now from the caller's side, it's just a stream again. But am I overthinking this? :P

Submitted October 19, 2017 at 03:36PM by jwalton78

Web design & Web development Hot Updates - Oct 19, 2017

http://ift.tt/2yslZJ4

Submitted October 19, 2017 at 03:38PM by MrAdil13

Introducing StdLib Sourcecode: Share Your Node.js "Serverless" Code With Developers Worldwide

http://ift.tt/2zA4rbP

Submitted October 19, 2017 at 10:47AM by keithwhor

The node environment

Hello, I am building my first app using Express and Vue. I have professional experience with PHP and Go, as well as React. My main concern is: a see a lot on .something files in Node projects' directories, what are all these tools people are using (Babel - well i know about this one, Eslint, Snyk ecc...) and which should I be using? Can you tell me more or link me to resources so I can understand the environment better? (Most used tools, most used practises etc)Thank you!!

Submitted October 19, 2017 at 09:48AM by LC2712

To type or not to type: quantifying detectable bugs in JavaScript

http://ift.tt/2yauuFa

Submitted October 19, 2017 at 03:31AM by fagnerbrack

Wednesday 18 October 2017

Experiences with Babel?

Trying to decide if I should go for it. Any negative and positive experiences you share will help.

Submitted October 18, 2017 at 10:18PM by qtrc007

Struggling to get a committed transaction using NodeJS and MSSQL

function UpdateDatabase(cd){ var Character_ID = -1 try { sql.connect(config).then(pool => { console.log("This happening?"); pool.request() .input('Url', sql.nvarchar, cd.url) .input('Character', sql.nvarchar, cd.Character) .input('Player', sql.nvarchar, cd.Player) .input('Species', sql.nvarchar, cd.Species) .input('Specializations', sql.nvarchar, cd.Specializations) .input('System', sql.nvarchar, cd.System) .input('Brawn', sql.int, cd.Brawn) .input('Agility', sql.int, cd.Agility) .input('Intellect', sql.int, cd.Intellect) .input('Cunning', sql.int, cd.Cunning) .input('Willpower', sql.int, cd.Willpower) .input('Presence', sql.int, cd.Presence) .input('Soak', sql.int, cd.Soak) .input('WoundsThreshold', sql.int, cd.WoundsThreshold) .input('StrainThreshold', sql.int, cd.StrainThreshold) .input('RangedDefense', sql.int, cd.RangedDefense) .input('MeleeDefense', sql.int, cd.MeleeDefense) .output('Character_ID', sql.int) .execute('AddUpdateCharacter',(err,result) => { console.log(err); console.log(result); }) }).then(result => { Character_ID = result[0]; if(Character_ID != -1){ $(cd.Skills).each(function(key,value){ pool.request() .input('Character_ID', sql.int, Character_ID) .input('Skill', sql.nvarchar, value.Skill) .input('Career', sql.bit, value.Career) .input('SkillLevel', sql.int, value.Level) .output('CharacterSkill_ID', sql.int) .execute('dbo.AddUpdateCharacter') }) $(cd.Talents).each(function(key,value){ pool.request() .input('Character_ID', sql.int, Character_ID) .input('Talent', sql.nvarchar, value.Talent) .output('CharacterTalent_ID', sql.int) .execute('dbo.AddUpdateCharacter') }) } }) } catch(err){ console.log(err); } sql.close(); }; I have no errors. I have no messages. "This happening?" does not print. However when I remove the sql.close() it throws a "Global connection already exists. Call sql.close() first", the "This happening?" message as well as the following warrnings:(node:12584) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'type' of undefined (node:12584) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.I feel like this is wrong as it's opening a global connection to the database and it should be opening a single connection to the database. I see a connection opened on a SQL trace but I see no execution.

Submitted October 18, 2017 at 09:58PM by Thriven

node.js child_process spawn ignoring equal signs

http://ift.tt/2xO9Gmi

Submitted October 18, 2017 at 06:51PM by Joe_Scotto

[Need Framework Advice]

Hey everyone,I've been reading around on /r/nodejs today and rather than grabbing a random framework that looks sort of cool, I'll be asking for some advice.What I need to do:Create / Update / Delete data in a Database (preferably NoSQL or Mongo)Provide a backend after a loginVisualize the data (more like a Frontend Task but whatever)Able to upload a .csv, .xls or .xlsx, with the server handling a task after the upload, notifying the user about the progressCreating PDF files from that task and providing the user with itEDIT:A boilerplate for the framework would be great.I hope to hear your glorious advice. I've been eyeing feathers, but am unsure since I'm still new to nodejs.Regards

Submitted October 18, 2017 at 07:22PM by HypnotoadProductions

Web design & Web development Hot Updates - Oct 18, 2017

http://ift.tt/2gOQzTp

Submitted October 18, 2017 at 06:03PM by MrAdil13

Looking for inspiration on how to improve performance of my code

I am looking to optimize my script in order to perform better.Here is a short description of what it does:It subscribes to a socket-connection (pusher-client)This socket connection pushes items (jsons) to meI process it by comparing it to a JSON-Object of the format {'name':'price'}.If the item is <= the price of the "db" I make a buy-apicall.This is a simple get-request. In order to make this faster, I use keepalive. To have a connection that is already alive, I make periodic api-calls to another endpoint.Sidenote: The code runs on a linux VPS that is as close as possible to the server (if everything runs well, the items from the json arrive with a delay of ~9ms)Somebody still manages to be constantly faster as this is a first come first serve system. Is there any aspect that I did not think about?If I'm in the wrong place to ask such question, please redirect me to the right place. Because I also have no idea of where to ask programmingrelated questions. I'm an it student, and my friends (from uni) aren't into coding at all, so I'm left with the internet. And other than reddit, I found no place yet where people are actually active.

Submitted October 18, 2017 at 06:16PM by cephii2

Strapi v3@alpha.6 release and new website

http://ift.tt/2ywT8CN

Submitted October 18, 2017 at 04:45PM by pierreburgy

A safer way to load environment variables

http://ift.tt/2gOIfTH

Submitted October 18, 2017 at 02:36PM by sethholladay

I'm building a Messenger clone on Android. Can I use Node on my server?

I'm creating a Messenger/WhatsApp like Android application for messaging over internet. I'm looking for options for server stack. Can I use Nodejs if my app is written in Java?

Submitted October 18, 2017 at 01:51PM by iBzOtaku

Command Query Responsibility Segregation & Event-Driven Architecture with Nest (Node.js)

http://ift.tt/2x4Ho7o

Submitted October 18, 2017 at 10:39AM by mysliwik

Speedlane micromodule for building REST APIs. Feedback welcomed.

http://ift.tt/2xNQwSd

Submitted October 18, 2017 at 10:53AM by _unst4bl3

How JavaScript works: memory management + how to handle 4 common memory leaks

http://ift.tt/2x1qBEz

Submitted October 18, 2017 at 09:57AM by fagnerbrack

Tuesday 17 October 2017

DOS security vulnerability, Octoboer 2017

http://ift.tt/2zvLVBq

Submitted October 17, 2017 at 10:06PM by dwaxe

Which stack suits my needs best?

Hello, problem: I am building an IoT device that logs data to some API, then I want to see that data in lists or graphs.I want to build the API and the webapp in JS, so I investigated a bit and apparently:Meteor.jsExpressI would like to use Vue.js, Mongo and probably Socket.io. I like Meteor because it looks easy to start with, but Vue.js is not well supported. Express (+ Mongo etc) seems more flexible, but I am scared by all those extra tools that I'll need to make it work. Also, I would like to play around with something that can be useful in my career - and I might need to draw graphs, what do I use for that?Any tips? Thank you!

Submitted October 17, 2017 at 08:35PM by LC2712

High severity denial of service vulnerability in Node 4.x, 6.x, 8.x

http://ift.tt/2yu5dqN

Submitted October 17, 2017 at 08:31PM by pimterry

cli-cold-wallet: Make a cold storage for your bitcoins right in terminal, offline

http://ift.tt/2zoGT9H

Submitted October 17, 2017 at 07:35PM by Overtorment

What's New in Mongoose 4.12: Improved Connection Events

http://ift.tt/2yvhIEA

Submitted October 17, 2017 at 05:25PM by code_barbarian

[help] Patterns for using Async/Await with Mocha

I'm currently looking for suggestions on patterns for how to best handle writing async/await tests within Mocha. In writing tests that handle an unresolved or rejected promises, I'm getting the following warning message.(node:81841) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.With the code being:it('should return a 401 if the auth token is missing or invalid', async () => { let result; let error; const seed = await agent.post('/workOrder/').set('Authorization', authHeader).send(workOrder); const id = seed.body.id; try { result = await agent.get(`/workOrder/${id}`); } catch (e) { error = e; } expect(result).to.be.undefined; expect(error).to.not.be.undefined; expect(error.response.text).to.equal('Cannot Authenticate'); expect(error.response.status).to.equal(401); }); I know that Mocha does not like the use of Lambdas, but have not seen any negative effects in using them so far.Basically looking for any insights or resources on how to handle this.

Submitted October 17, 2017 at 04:27PM by AtWorkBeCool

How to run node.js app from my browser

I am planning to install node.js on my hosting and then create a twitter bot with node.js.What I want to achieve is sending some commands to this node.js application from my javascript code running on the browser. So, this is I think a connection between front-end and back-end.I want to pass the data in a form when I hit the submit button and the node.js application will work in accordance with the information sent from the form.What is the correct way to do that?

Submitted October 17, 2017 at 02:55PM by eligloys

[Code review request] Reuse MongoDB connection in Express application

I've already asked for a code review in stackoverflow, with no luck, so I thought I'd ask here as well.I think the title is pretty straightforward. I implement a client for MongoDB and I want to include it anywhere in my app and share the connection (not create it always or close it always).So my question is, what are the downsides of this implementation? I've noticed that if I don't explicitly call disconnect the app never finishes / closes. Am I doing something wrong here? What are your suggestions to increase the re-usability and quality of my code? Thanks!const mongodb = require('mongodb'), MongoClient = mongodb.MongoClient, dbName = 'ppl', collection = 'pp', mongoUrl = `http://mongodbip-and-port/${dbName}`, { promisify } = require('util'); let db; class Mongo { static connect() { return new Promise((resolve, reject) => { MongoClient.connect(mongoUrl, (err, database) => { if (err) { reject(err); } db = database; resolve(); }); }); } static disconnect() { return new Promise((resolve, reject) => { try { db.close(); resolve(); } catch (error) { reject(error); } }) } static insertMany(data) { return new Promise((resolve, reject) => { try { const col = db.collection(collection); col.insertMany(data, (err, returns) => { resolve({ err, results: returns.insertedCount }); }); } catch (error) { reject(error); } }); } } module.exports = Mongo;

Submitted October 17, 2017 at 03:11PM by JavascriptFanboy

CLI tool to generate minimalistic npm modules

http://ift.tt/2yutqim

Submitted October 17, 2017 at 02:14PM by pablopunk

Can someone link me to a good tutorial, or tell me how to send and receive data from servers.

No text found

Submitted October 17, 2017 at 12:25PM by soulblade249

Looking for message queue abstraction

I'm looking for something that will abstract integration with message queue systems.What I need is an abstraction which allows me to implement message/job handling without deciding which message queue solution will be used (for start it can be DB based on, later it will be switched to Amazon SQS).Basically, I'm looking for something similar to Laravels Queue system (http://ift.tt/2go9nMf).I've found lots of packages that are bound to a specific server (eg redis, SQS). Is there anything available that would suit my case?Thanks,

Submitted October 17, 2017 at 09:46AM by __radmen

Monday 16 October 2017

Pass variable to template with odd twist

I am trying to pass the result of a find() search to my tempate but since I am using a middleware from a template I decided to use (never again), I seem to set the redirect before my res.render() and that causes double headers, okay no problem. Remove that right? Well no, it says path must be a string.How else can I send the data though, I need to be able to inside an if statement at the end of my route pass {ap:allAP} as that is the result of my find()I am using Node.js v8.x Express latest Swig latest [middleware-responder] Check this out to understand res.Redirect and setRender// show model app.get('/dashboard/it/model', //setRender('dashboard/it/model'), setRedirect({auth: '/login'}), isAuthenticated, dashboard.getDefault, (req, res) => { AP.find({}, function(err, allAP){ if(err){ console.log(err); } else { setRender('dashboard/it/model',{ap:allAP}); } }); }); Another way I tried, I am really grabbing at straws now..// show model app.get('/dashboard/it/model', (req, res) => {AP.find({}, function(err, allAP){ if(err){ console.log(err); } else { res.render('dashboard/it/model',{ap:allAP}); } });}, setRender('dashboard/it/model'), setRedirect({auth: '/login'}), isAuthenticated, dashboard.getDefault, (req, res) => { }); (http://ift.tt/1sPVq71)

Submitted October 16, 2017 at 10:34PM by jsdfkljdsafdsu980p

What's the point of Sequelize associations if using MySQL DB First approach (no migrations) and Rest API?

What's the point of having associations in my models code if I'm using Rest API for an SPA (Angular4), no eager loading, and not using migrations (ie DB First)? I've setup my whole Db using Workbench and establishing the foreign keys there.

Submitted October 16, 2017 at 09:40PM by Anacrust

Building a Budget Manager with Vue.js and Node.js (Part I)

http://ift.tt/2yrXQSn

Submitted October 16, 2017 at 05:17PM by Shiintapix

Node.js frameworks - 2017 edition

So, JavaScript is moving forwards, lightening fast, and node.js as well. There are so many frameworks these days, e.g. Express, Hapi, Koa, Restify...Which framework would you recommend for doing a REST API service only?

Submitted October 16, 2017 at 04:26PM by JavascriptFanboy

Node.js Security Overview

http://ift.tt/2yMW53t

Submitted October 16, 2017 at 04:12PM by gergelyke

I GOT HACK - Earlier This Node.js Programming Tutorial For $29 Now $0

http://ift.tt/2idgCan

Submitted October 16, 2017 at 01:55PM by KiranKiller

Hosting small nodejs apps - Raspberry PI 3 vs DigitialOcean/Heroku etc?

I want to host a few small apps/website like a budget app, simple turn based card game, travel management etc which will use max 5-10 people.Stack: postgresql, node.js/express, vue.jsCan I host this on my raspberry pi 3 with good performance or would recommend a cloud host? And can I even host mostly apps with e.g. the 5$/month option on DigitalOcean?

Submitted October 16, 2017 at 02:18PM by Shovez

how to overcome with scalability issue

Just run load test if 1000 users come and try to insert single data and it crashes after inserting some data since its create single thread. What are the best approach to create multiple threads or other techniques.

Submitted October 16, 2017 at 12:58PM by ahmed0627

Using Vue Components in your Express app

http://ift.tt/2ylV7dY

Submitted October 16, 2017 at 12:07PM by hyra_

Advanced Features and Fixes Release of Node.js 8.0 brings for Developers

http://ift.tt/2zcT20q

Submitted October 16, 2017 at 06:01AM by cristinereyess

Our CI steps - can you recommend some more?

Would like to check that we don't miss any useful/cool CI check, following are the steps we produce on every commit in Jenkins, please recommend any other check/plugin/advice:Commit -> Cold smoke testing ESLint + few Node.JS specific plugin rules Outdated dependent packages Vulnerable dependent packages Complexity check Coverage check, build fails if goes below 80% API/E2E testing within docker-compose

Submitted October 16, 2017 at 07:35AM by yonatannn

Node.js for Mobile Apps: full-fledged Node.js for Android and iOS

http://ift.tt/2xRymOx

Submitted October 16, 2017 at 07:34AM by r-wabbit

Sunday 15 October 2017

How to create a user registration system with nodejs and mongodb?

I need to create a system of user registration and login using nodejs and mongodb, I am somewhat raw with both technologies, but know how to create it? Do you recommend any specific module or library for this task?

Submitted October 15, 2017 at 01:51PM by MagoMerlin

Neat demo for building and deploying Node apps

http://ift.tt/2xGwbti

Submitted October 15, 2017 at 02:48PM by libsysguy

Setting up a Node.js / Docker developing environment

Hi guys, I'm starting to study some Node.js and I would like to learn to use it with Docker. I'd like to set up a docker container to simulate a server (so that I can, when needed, just put my container on the server and make it work), while putting on my host OS (I use Ubuntu 16.04) what's necessary for development.I'm quite a noob in this though, and I don't really understand what's to install on the server and what on the development machine, and also how to properly set up Node.js in the docker container.Any explanation will be appreciated!

Submitted October 15, 2017 at 12:37PM by ScrivaniaMicrosoft

Implementing Serverless Node.js Functions Using Google Cloud

http://ift.tt/2wRZz3t

Submitted October 15, 2017 at 09:07AM by r-wabbit

Best way to verify if a function was called with some values? Struggling with Sinon spies.

I'm working on a project about Machine Learning in JavaScript

http://ift.tt/2xFZH73

Submitted October 15, 2017 at 10:08AM by laoqiren

Can you recommend any open source projects to learn from?

I don't get to work with Node developers but I know how quickly you can learn when done by example.Can you recommend any 'working' (not just a boilerplate) projects?

Submitted October 15, 2017 at 10:02AM by emmentalcheesefan

Saturday 14 October 2017

Currently looking for a project to contribute. So node community what you got ?

No text found

Submitted October 14, 2017 at 09:33PM by andreGarvin1

Building a RESTful API With Koa and Postgres

http://ift.tt/2ykwT15

Submitted October 14, 2017 at 07:09PM by michaelherman

Issues with Express and MySQL

Documenting your Node.js API with apiDoc

http://ift.tt/2gjo4jA

Submitted October 14, 2017 at 10:36AM by jonathasrr

Is there a node equivalent of Ruby's pry?

I'm a Ruby on Rails developer.When things don't work in RoR I can just toss debugger into my code, or fail, and I get access to excellent data including error logs, stack traces, and a repl that drops me right into the server where I can start experimenting with what's currently in scope (like function parameters).Meanwhile AFAIK node has nothing. I mean, I installed morgan and morgan-response (logs response and request bodies, useful for restful api development), but that's not a repl.Please correct me?Edit: I think I phrased my question wrong; I know there is a repl for nodejs. What I'm asking is if there is any software that lets the developer "pause" the server (be it express or something else) and jump into a "live" repl?

Submitted October 14, 2017 at 08:59AM by frompadgwithH8

Friday 13 October 2017

ES proposal: class fields

http://ift.tt/2vOhuoa

Submitted October 14, 2017 at 01:10AM by fagnerbrack

Node.js code to prompt Alexa to say "Would you like another fact?"

I am building a simple facts skill based (so far) completely off of Space Facts provided by Amazon. I would like to have Alexa prompt the user to say yes or no or time-out if there is no response.Replace the facts in this and you have my code: http://ift.tt/2gEb2dn anyone give me a hint in the right direction towards implementing that with node.js?

Submitted October 14, 2017 at 01:43AM by actor-observer

queuelite.js - Super simple, dependency free job queue I've build for a side project. Maybe it will come in handy for your side project as well.

http://ift.tt/2ynuaGb

Submitted October 13, 2017 at 09:39PM by AlphaX

Need help with saving data to .json

Alright, so I'm making a discord bot RPG game, and I need to make a way for players to create their character and save their characters to an array in a .json file.I want the output into a file called players.json to look something like[ { "id":132603064220778496, //there user ID "name":"Player1", //name specified as an argument after the command //then some base stats for a new character }, { "id":132603064220778496, //there user ID "name":"Player2", //name specified as an argument after the command //then some base stats for a new character } ] I already have File Systems installed, and I'm using it to pull enemies from an enemys.json file, but I need to also be able to write new characters into the players.json.What I'm looking to do (tl;dr):Run a for loop to see if the user id is already inside of an index in the arrayIf it isn't, then find what the last index is (players.length)Then add all the info according to the command into the next available index position in the players.jsonI'm mainly having trouble with the last bit, as so far, I've only been able to overwrite all the data in the file with a fixed set of data, nothing else.tyvm in advanced!

Submitted October 13, 2017 at 07:12PM by Voxxey

Embedded Objects vs Embedded Types in Archetype

http://ift.tt/2ymoMCP

Submitted October 13, 2017 at 06:27PM by code_barbarian

Do we still need to transpile node js with babel?

Almost every node js repo I find on github these days uses babel for some reason. And so do I.But I found out that recent versions of node js (particularly >8.5.0) now have full support for most of the ES6 stuff like async await, lambdas and what not.So my question is, am I missing something or can we stop transpiling already? We don't actually care about browser backward compatibility in server side JS right? Why keep using babel when node supports ES6 anyways? My webpack transpiling step takes ~10 seconds.

Submitted October 13, 2017 at 01:53PM by changingminds

How to have a number with 7 decimal always with Knex/Objection.js

I've discovered Objection.js and Knex through this subreddit and am sold on it having come from Sequelize. Thank you!I have a latitude and longitude that I want to save to my database. In mysql I would define it as such:latitude DECIMAL(11, 6),longitude DECIMAL(11, 6),In Knex I do this cause I don't see additional options in the docs to define length: table.decimal('latitude'); table.decimal('longitude'); When I save to my db the persisted object returned by promise has the entire number but in the db there are only 2 decimal numbers after the comma.At this point it's just easier to save as string?

Submitted October 13, 2017 at 02:10PM by brogramming102

How to write reliable browser tests using Selenium and Node.js

http://ift.tt/2hmmZYv

Submitted October 13, 2017 at 02:11PM by ginger-julia

Looking at Tree-Shaking in JavaScript with Rollup

http://ift.tt/2yiUdOw

Submitted October 13, 2017 at 09:55AM by aderoz

New to node, need help with query timing

Long time Coldfusion developer, working on porting our legacy apps over to NodeJS.Im working on a work source provider for my firm, I query their API and pull down the XML, convert this to JSON using xml2js then proceed to parse the content ready to insert into our database for the end users to carry out the work.My trouble is I have 3 functions, one creates a place holder in the table, the next loops through the client list and adds these to the record based on the ID, then the final insert is for the rest of the content.The trouble I am having is with the asynchronous nature of node. Its that fast that the other functions try to complete before the previous functions have finished.How can I solve the timing of these queries to wait for the others to complete? Would I use promises?Here are my functions: http://ift.tt/2gB8755 would greatly appreciate any help or guidance on this.

Submitted October 13, 2017 at 09:32AM by mattj85

Thursday 12 October 2017

Having trouble registering user with passport-local

help with background input

so i'm currently using readline to detect input from my rfid scanner however when i run it as a background process on the raspberry pi it no longer picks up input any idea on how to pick it up?thanks in advance w3bb0.

Submitted October 12, 2017 at 08:29PM by w3bbo1

A useful way to manage and keep track of node Docker images

http://ift.tt/2lyuXKG

Submitted October 12, 2017 at 08:20PM by weighanchore

What's New in Mongoose 4.12: Single Embedded Discriminators

http://ift.tt/2ylIU8N

Submitted October 12, 2017 at 07:14PM by code_barbarian

Search & install npm packages from import/require statements.

http://ift.tt/2sdKz9B

Submitted October 12, 2017 at 03:57PM by indatawetrust

Reading csv of 2-3gb of data

How much time do you think will be taken if read a data of 2-3gb of csv, perform some operations and save it in database.

Submitted October 12, 2017 at 01:54PM by ahmed0627

MEAN Stack Crash Course – Using MongoDB with Node.js, Express and Angular 4

http://ift.tt/2y4nBst

Submitted October 12, 2017 at 08:55AM by RubiksCodeNMZ

Is node enterprise ready?

I've been toying for a while with the idea of starting learning node.JS more deeply than the tutorial-level knowledge that i have. My work experience is maily focused on Enterprise Java applications, also with tiny bits of .Net.My question (and worry) is, does node provide any level of code maintainabilty for enterprise grade solutions? I hope i don't sound like a troll, it is a genuine question.I mean, i get it is pretty easy to write web apps with Express, access a DB with sqlize, and so on. But how do these guys fit together? Can code be organized, unit tested, partitioned in a meaningful way, can we have domain driven design? Or do we just end up with a monolithic JS file with mega callbacks (ok, we have async/awaits now) that is going to be super painful to debug?I'd be interested io n learning your point of view.

Submitted October 12, 2017 at 08:30AM by JustADirtyLurker

Wednesday 11 October 2017

Node v8.7.0 (Current)

http://ift.tt/2hC23Jz

Submitted October 11, 2017 at 09:57PM by dwaxe

Node.js State of the Union

http://ift.tt/2xURBEB

Submitted October 11, 2017 at 04:42PM by sdomino

How to make a Singleton promise on an Express server?

The processOrders() can take a very long time to complete, but then lives for 300 seconds after it is done. How can I ensure that n users hitting my endpoint aren't queuing up n promises and all wait on the same promise?I'm getting frustrated that I can't find the answer and am starting to lean towards a Cron job that just saves GOOD_ORDERS to S3 and be done with it. Can anyone help?let GOOD_ORDERS = { expires: moment().subtract(10, 'seconds').utc().format() } const pendingOrders = () => { return processOrders() .then(data => { GOOD_ORDERS = data return }) } app.get('/', (req, res) => { if(moment().isAfter(GOOD_ORDERS.expires)) { pendingOrders() .then(() => res.send(GOOD_ORDERS)) .catch(err => res.send(err)) } else { res.send(GOOD_ORDERS) } })

Submitted October 11, 2017 at 02:06PM by __woah_man

Please add *.env to .gitignore

I assume most of you here know this but if you are going to be publicly hosting your project on github or a similar please add your .env files to the respective ignore file.Doing a simple search on GitHub finds millions of commits and within the first 10 pages it is possible to find AWS keys, app keys, DB credentials, and Google API Keys.

Submitted October 11, 2017 at 02:13PM by thezadmin

Random "TypeError: Cannot convert object to primitive value" on Node.js application startup

How can we get more enterprise end users engaged in Node.js?

http://ift.tt/2gf5B4F

Submitted October 11, 2017 at 07:46AM by r-wabbit

Tuesday 10 October 2017

How to write practical tests to an app (or piece of code )that all it does take data from a REST service process it and send it to another service ?

Hi I'm writing a Shopify-facebook app and i'm struggling to find a practical method to test my code ,since it's all depended on the external APIs ,and the only tests i'm doing is hands-on test (run the app ,check manually if it's working )Mocking the external APIs(Shopify's ) with nock seems to be a time consuming task ,and might end up generating bugs in the mocks

Submitted October 10, 2017 at 11:51PM by 10701220

Last Week in Node.js Working Groups - October 2nd, 2017

http://ift.tt/2y8PrUk

Submitted October 10, 2017 at 09:42PM by _bit

A week ago I was a Node/Express dev with no experience of ReactJS. This is what can change in a week!

http://ift.tt/2i0fhDB

Submitted October 10, 2017 at 09:43PM by pikadrew

Access variable from outside callback

I am trying to access outside a call back using the code below:stripe.tokens.create({ card: { "number": '4242424242424242', // This card info is test info still need to import actual card info "exp_month": 12, "exp_year": 2018, "cvc": '123' } }, function(err, token) { if(!err){ var stripeToken = token; } else { console.log(err); } }); console.log(stripeToken); I am having trouble getting the value of that final stripeTokenI need it for the rest of my code to work. Somehow I either need this to run client side and return a token to my req.body or have it run server side and deal with the issues that come with it.

Submitted October 10, 2017 at 09:21PM by jsdfkljdsafdsu980p

Node + Mongoose + Map from immutable.js

TestCafe v0.18.0 Released - Angular Selectors, Using Multiple Reporters, etc

http://ift.tt/2yb0VEA

Submitted October 10, 2017 at 07:07PM by henry_tula

Good ways to organize socket.io server-side code?

I'm adding socket io functionality to one of our big servers and I'm struggling to organize the code. Because I have to pass the main socket.io Server instance everywere, everything socket.io related is in one ugly lump of code (like this http://ift.tt/2xx1jLL ). Are there any examples online of healthy, modular web-server using socket.io?

Submitted October 10, 2017 at 05:39PM by sosloow

unhelpful-nodejs.PNG .catch(error=>{console.log(error)} is so annoying

http://ift.tt/2yel6Dn

Submitted October 10, 2017 at 05:48PM by ahnman341

NodeJS/ExpressJS/HandlebarsJS Help

I'm creating a web application using languages and frameworks above but I've come to a problem when using handlebars on both client and server side that I can't seem to figure out. When I use it renders on server side thus making it useless when trying to create a templated on the client side. If someone can help me figure a solution to this problem out it would be greatly appreciated.

Submitted October 10, 2017 at 06:10PM by despawned

What do you guys consider "mandatory" packages for your express or koa server (and why)?

I'm always looking to find new quality packages, figured this would be a good way to stumble upon some more...A few of mine are:rollbar: great crash reporting and pretty intelligent about grouping similar issuesdotenv: git security. Never accidentally upload an API key/password again.bunyan: so much easier to read log files with bunyan...nodemon: some people hate using this, but I find it to just make my initial testing a lot easier by removing that repetitive (and annoying) server restart taskedit - formatting

Submitted October 10, 2017 at 07:00PM by tenbigtoes

Choosing the best Node Js shopping cart for your business

http://ift.tt/2y6SJYj

Submitted October 10, 2017 at 04:16PM by sharonj15

pg-promise with query files (.sql) or queries in javascript?

Which do you prefer and why?

Submitted October 10, 2017 at 02:11PM by Shovez

Noob here - Require modules once or in multiple files?

Let's say I'm setting up Passport and in my main app.js at the top of the file I have:const passport = require('passport'); If I also have a separate Passport config file being required in my main app.js is it best to pass the passport variable to it like so (I think that's what's happening, right?):require('./config/passport')(passport); or to just require it again at the top of my passport.js file...const passport = require('passport'); Does it make a difference?Can I also do something like this in main app.js:require('./routes/article')(express); As opposed to this in routes/article.js:const express = require('express'); const router = express.Router(); Thanks!

Submitted October 10, 2017 at 02:43PM by throwawaylayman90

How to create a Frontend App which takes some input & sends to Node Server which then returns a user-defined HTML,CSS & JS as separate files which user entered ?

I want to create something like http://ift.tt/2lBBYOM which takes some input & provides a .zip file containing html & cssIdk how to do it even though I checked the source code of the above website is in Vue but Idk the deployed code running on Firebase ?

Submitted October 10, 2017 at 12:22PM by deadcoder0904

I've been struggling with a mysql connection pool, which doesn't drop connections, please send help.

http://ift.tt/2wJVGtO've been working on this for about 2 weeks, still can't get it to work

Submitted October 10, 2017 at 09:55AM by Mattisanidiot999

Node B security

http://ift.tt/2kCtxDq

Submitted October 10, 2017 at 07:18AM by rainahimanshu456

Create a RESTful API with Node.js, Hapi, and Couchbase NoSQL

http://ift.tt/2xPI0yU

Submitted October 10, 2017 at 07:30AM by dobkin-1970

Monday 9 October 2017

Why is my Node/Redis server so much faster on my digital ocean server then on my iMac even though my iMac is many times more powerful?

No text found

Submitted October 09, 2017 at 08:57PM by OzziePeck

Possible to create javascript based game with hidden code?

I don't want people modifying the code to my javascript game as I'm going to add a leaderboard. Would Node.js achieve this? Or should I go PHP? There's alot of information about multiplayer but not much about stopping cheating.FYI, I am not well versed in this subject :)

Submitted October 09, 2017 at 07:38PM by Weffu

Noob seeking help about Oauth2 and electron

Basicly, I have created a simple Restfull api backend server for my electron app to use. I want to use Oauth2 authentication tokens for my http requests and, following some tutorial (beer-locker-tutorial), I made a basic authentication system with passports basic strategy and Oauth2. The server works like it shows in the tutorial, but I just can't get it to work with electron, the Basic authentication prompt just doesn't appear, which I assume is the main problem. Total noob to node backend and Oauth2. Any links/tips/suggestions would help.

Submitted October 09, 2017 at 07:06PM by Duderis

Very new to Node/Express - help with req.body empty object issue please?

This might be a stupid question... I'm trying to get the input from a form as JSON. My form enctype is set to 'application/json' and just has one input field. The submit action goes to the proper endpoint.In my file containing my route information for this particular model I have (among a few other things):const express = require('express'); const router = express.Router(); const bodyParser = require('body-parser'); // Create application/json parser var jsonParser = bodyParser.json(); // Item Submit Post Route router.post('/add', jsonParser, (req, res) => { console.log(req.body); return; }); And the console logs an empty object '{}'. I'm trying to get the req.body.title but it doesn't appear to exist. This is my first attempt at Express/Node and everything was going smoothly up until this point. Any help would be very much appreciated.Thanks.

Submitted October 09, 2017 at 05:49PM by throwawaylayman90

Nest - A progressive Node.js framework has a support for pure JavaScript ES6+ BABEL now!

http://ift.tt/2wAUAjd

Submitted October 09, 2017 at 04:29PM by mysliwik

Neutral microservice database interface with advanced Query and Transaction builders

http://ift.tt/2xtPVQs

Submitted October 09, 2017 at 04:36PM by andvgal

What is the relationship between NPM, The Node.js Foundation, and Antifa?

No text found

Submitted October 09, 2017 at 03:32PM by misterAxiomatizable

NPM stalking UC Berkeley’s conservative students, group says

http://ift.tt/2y1pRQi

Submitted October 09, 2017 at 03:49PM by misterAxiomatizable

TypeORM 0.1.0 is released. Besides MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, WebSQL databases now supports MongoDB, added Ionic/Cordova platform support and lot of other new features. The most feature-rich NodeJS ORM with amazing developer experience for small and enterprise applications.

http://typeorm.io/

Submitted October 09, 2017 at 03:39PM by pleerock

n00b question on best practices. Should I avoid synchronous version of functions?

To elaborate, take the fs module: I have functions like mkdir or unlink with their sycnhronous versions being mkdirSync and unlinkSync. I know that if I don't use the sync version I can handle errors on callbacks, but I can just as well use try/catch. What are the best practices here, if any?Thanks in advance!

Submitted October 09, 2017 at 04:14PM by PalomSage

How to Secure Node.JS Application from Online Threats

http://ift.tt/2yuQ8YI

Submitted October 09, 2017 at 12:59PM by ecares

Asynchronous stack traces: why await beats .then()

http://ift.tt/2xP4vEj

Submitted October 09, 2017 at 09:32AM by fagnerbrack

Node.js Clusters & WebSockets

http://ift.tt/2tD4sJH

Submitted October 09, 2017 at 07:09AM by goriunovd

Sunday 8 October 2017

A Playlist on the NodeJS Child Process Module

https://www.youtube.com/attribution_link?a=Zs7M9TxIqJ0&u=%2Fplaylist%3Flist%3DPLL1UEcDHVPjkGyNpXH4Ep4QPXkVDJNetL

Submitted October 09, 2017 at 03:35AM by duly-node

MQTT Architecture question

I'm coming from a Python background and am working on a new project and want to try and use NodeJS exclusively but I'm not sure if it's the right choice. Here's what the architecture looks like:Multiple Hardware Devices (Arduino)These publish out to a MQTT broker. In theory, I could have hundreds of these.Application Server (???)Normally this would be a Python server that listens for changes to the channel and then saves them to MongoDB and performs additional actions if the values are over a certain threshold (temperature is over 100 degrees, for instance)Client Web Server (NodeJS)This is \a website where a client can come in and look at current/past values and make updates to their application. It's really nothing more than NodeJS server reading/writing to the MongoDB.My question is this: Assuming that my hardware devices can't do REST API calls, but only make MQTT posts, does my application sever have to be Python or something similar to monitor the channels? Is there such a thing as a NodeJS MQTT subscriber that can monitor and handle hundreds (maybe thousands) of MQTT updates coming into a channel and save that data to mongo?I'm not looking for specific code, just some general guidelines based on other peoples experience about having Node work in this kind of capacity.Thanks!

Submitted October 08, 2017 at 10:17PM by 6ThePrisoner

Clusterluck - a library for writing erlang-like decentralized distributed systems in node.js

http://ift.tt/2ogcxzt

Submitted October 09, 2017 at 01:19AM by kiadimundi

What is the relationship between NPM and the node foundation?

No text found

Submitted October 08, 2017 at 09:55PM by misterAxiomatizable

CLI tool for quickly creating React JS components to publish to NPM

http://ift.tt/2hV5peu

Submitted October 08, 2017 at 03:25PM by delta_skelta

Async/await error handling?

Hey all!We're working on a Node.js app with express using async/await as the primary asynchronous mechanism. One thing that I'm personally having a hard time understanding is how the error handling works.With async await, I have a try catch statement wrapping the execution of the express controller (the main function) which seems to work. But im not sure how errors get bubbled up to the main function. It seems like error's are thrown within individual functions instead of popping up to the top; and if thats the case, do I need to have a try/catch statement wrapper on every function to manage errors?Any help or pointers to a resource would be greatly appreciated!

Submitted October 08, 2017 at 02:56PM by Noderly

Open Source noob here -- What is a relatively simple library that I can build that will help out the community?

Hey there,I'm a CS student in University and absolutely love Node (used it a bunch in my first internship). I wanted to improve my skills as well as give back to the community and what better way to do it than an open source library! I would love some ideas/suggestions on something that isn't crazy difficult that I can work on :)Thank you

Submitted October 08, 2017 at 12:14PM by pynoise

polymorphism in ORM?

I'm a total newbie with just a small node/express/jade/mssql web app under my belt. To move away from raw SQL regardless of the DBMS I plan to use in future projets I've been looking at query builders like knex and entire ORMs like sequelize and bookshelf.As for ORMs, I've been researching and I can't find anything like polymorphism, by which I mean being able to define a model like "Document" and having "Invoice" and "Stock Movement" each extend Document. Does anyone know if this would even make sense?Also I plan on making my next app RESTful, so if anyone can vouch for a RESTful API tutorial out there I'd appreciate it!

Submitted October 08, 2017 at 06:21AM by nospambert

what is the free IDE for node js ? and also tutorial links for beginner?

I am interested in learning node js, but i don't know where to start. i am looking for free IDE and also tutorial for the beginners. i hope u guys can recommend me..thankyou

Submitted October 08, 2017 at 07:13AM by sigmarush

A Minimal GraphQL API that runs on Node, written in TypeScript

http://ift.tt/2fTeakM

Submitted October 08, 2017 at 07:32AM by bttf88

NPM changes downloads API and informs the world 38 hours later - how it affected me and why it's not a good thing to do

http://ift.tt/2fT8Kq5

Submitted October 08, 2017 at 07:29AM by siddharthk

Saturday 7 October 2017

Auth0/Passport - How to actually hold login??

I'm using Auth0 with the suggested connect-ensure-login middleware plugin (definitely not my choice lol, client request).After successfully logging in, there is no cookie or session saved so any secure endpoint fails. I thought this was up to Auth0 to handle automatically?Has anybody used this setup before? Tips are appreciated

Submitted October 08, 2017 at 03:46AM by itsKEVINbro

[Video] Creating RESTful Web Services the Easy Way with Node.js

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

Submitted October 08, 2017 at 02:30AM by brunocborges

Routes configuration for update

Hi, I have actually a basic authentication system. I work with node and mongodb. I have a collection "users":User - email: string - password: string Ok, at this point, I have actually two routes: register (users/register) and login (users/login), and all is working fine.Now I want to add a field to the user, an array of Cars:User - email: string - password: string - cars: Car[] From my frontend (angular 2), a user will be able to add, update and remove a Car.I see two options to do this:I add only one route to update the user (users/update). It means I will have to send in the parameters of the request the new value of Collection[] (and others future editable fields).Or I create three new routes (users/collections/add, users/collections/update and users/collections/delete). In this case, I will only have to send the parameters requested to add, update, or delete a collection.I don't know which one to use. The first one seems more code saver for both side (node and angular 2), but more messy than the second one. The second one needs more code, but it will be maybe easier to use and maintain once coded.Do you have any advice?

Submitted October 07, 2017 at 07:23PM by GreenMonkeyBoy

How we run NPM packages in the browser

http://ift.tt/2kwPlQY

Submitted October 07, 2017 at 06:35PM by judofyr

Client-sessions not saving cookies

I am using an express setup and have installed a module called 'client-sessions' through npm in an attempt to save cookies to the user's browser when they log in. I am not using passport, I already have login authentication set up through my API.To my understanding, this is a 3-step process:1) Set middleware for client-sessions app.use(session({cookieName: 'session', secret: 'mysecret', duration: 30601000, activeDuration: 15601000}));2) Once a user is logged in, store the cookie in the user's browser with the following: req.session.user = user; // 'user' being the user object of the account stored in the API3) Then, every page redirect thereafter will check if req.session.user exists and contains valid account information.The first two steps seem to be working fine; when logging req.session to the console after the middleware is set, I am getting a blank object(i.e. {}) - I assume this means the middleware works correctly. Then after a user successfully logs in and eq.session.user is set, logging req.session successfully gives me the user object (so, no longer a blank object).However, when I refresh the page, req.session is blank again, and no longer contains the user object. For some reason, the cookie just isn't saving to the user's browser.According to this documentation (http://ift.tt/1wAgSin), setting req.session = cookieObject is enough to save a cookie to the user's browser, however it does not appear to be doing so.Any help?

Submitted October 07, 2017 at 06:29PM by pwnju1ce

Can't async/await to work in Webstorm? (Node js 8.6.0)

I am trying to write code like so:const res = await pool.query('SELECT NOW()') await pool.end() And I am unable to do so, since I get "Expression is not a assignment or a call" error from Webstorm. JS language is set to ES6, Node 8.6.

Submitted October 07, 2017 at 05:28PM by HURCANADA

Explain to me like I am 5: What to use for front end of a node-express back end application??

Okay so I am currently working on a personal project, the application returns nearby users. It is gonna need some real time feedback that is why i chose node and express framework for the back end and mongoDB for the database. first decision made(whew!)Then came the client or front end of the app. and what i wanted essentially was to be able to use the back end for a web app as well as scale it to a mobile app if need be. Since i am starting on the web app i decided maybe angular(4 not JS) might be a framework i could use, but finding out that i would take a blow in SEO because it is an SPA is a humongous turn off. Then i hear about angular universal and i think Okay, but then your libraries might take a slap if they directly access the DOM or so. I read so much of it at this point i can't differentiate between opinion and fact.so my question is this, what do you recommend to make the front end of the application for it to also be SEO friendly: here are what i thought are options but still remain undecided:1. Using a templating engine: While it might help with SEO, i thought it might hurt if i try to make a mobile app with the same backend,2. React but i was still turned of because of the whole SPA not SEO friendly thing.Sorry for the long post any help please!!!!

Submitted October 07, 2017 at 03:17PM by zombie_kiler_42

Implement IoT, Microservices, Bots with Hemera

http://ift.tt/2h0uhj9

Submitted October 07, 2017 at 02:11PM by StarpTech

Modern Modules — Re-thinking the Node.js ecosystem for modern JavaScript

http://ift.tt/2vZ4LTf

Submitted October 07, 2017 at 12:16PM by fagnerbrack

Phone validation rest API powered by React, Node, Koa, NextJs, Auth0 and Stripe

http://ift.tt/2fZUaAN

Submitted October 07, 2017 at 10:00AM by mazzaaaaa

Friday 6 October 2017

Consistent Arrays from Query Params with Express and Archetype

http://ift.tt/2fS5iMd

Submitted October 07, 2017 at 02:22AM by code_barbarian

A crash course on Serverless with Node.js – Hacker Noon

http://ift.tt/2wwUcmP

Submitted October 07, 2017 at 12:03AM by 10701220

Node.js Weekly Update - Oct. 6

http://ift.tt/2y4O4p1

Submitted October 06, 2017 at 03:57PM by andreapapp

Top 10 Trending #nodejs Articles of September on StackTrender

http://ift.tt/2z3PyhV

Submitted October 06, 2017 at 03:25PM by joaopcribeiro

Async/Await, Simple Example in Four Lines

http://ift.tt/2g7T9Dz

Submitted October 06, 2017 at 01:19PM by 78urb

Hey, I am currently learning Node.js along with ES8 async/await and Redis to build a real-time web app. Am I doing right ? Do you have any advice or best practices to give ?

http://ift.tt/2fWzd9I

Submitted October 06, 2017 at 09:32AM by Maikoru

Node.js Foundation Readies Official Developer Certification

http://ift.tt/2xkDc7E

Submitted October 06, 2017 at 09:08AM by Parasomnopolis

Top 7 JavaScript Frameworks/Libraries For Developers

http://ift.tt/2fNgBFI

Submitted October 06, 2017 at 05:37AM by cristinereyess

Storing database query results globally

Is there a way to store database query results globally so that you can use it in other routes?For examplevar results; app.get('/dbresults', function(req, resp) { // database stuff results = result; }); app.get('/index', function(req, resp) { // a different db query var indexresult = result; }); So that in the /index route, I have 2 objects to use?

Submitted October 06, 2017 at 05:10AM by eggtart_prince

Thursday 5 October 2017

Install Node.js v6.11.4 on antergos?

No text found

Submitted October 06, 2017 at 02:14AM by MagoMerlin

Batch file flags not being used properly when launched by a bot (x-post /r/discordapp)

Hello, I recently started developing a discord bot with Node. I'm relatively new to modern Javascript, but coding in general I'm familiar with. I wrote some simple code to allow my friends to start a server on my computer for when I'm not around. It runs more or less fine, however the batch file has flags that are not being used when the bot launches it. When I launch it myself the flags work fine.I would like to figure out why this is happening.Thanks

Submitted October 06, 2017 at 02:17AM by feelsobnoxiousman

Track every page a user visits along with the different flows

I am wondering if there is a NPM module or github project I can clone that will allow me to track where each user goes and see their flow. I also want to be able to trigger emails based off what the user does. Emails are a secondary thing, I mainly want to track the users so I can better server them / optimize.

Submitted October 05, 2017 at 08:43PM by business_for_life

Basic Express Server Scaffold

http://ift.tt/2kqpHNz

Submitted October 05, 2017 at 08:46PM by Parasin

It is official. Someone hacked into my GitHub account, requested a password reset, and then deleted my account.

I logged into my college email, and well yeah. Going to be contacting the Reddit admins about this.

Submitted October 05, 2017 at 08:08PM by OzziePeck

Casting and Validating GeoJSON With Archetype

http://ift.tt/2fO2m3v

Submitted October 05, 2017 at 07:36PM by code_barbarian

Nest.js Brings TypeScript to Node.js and Express

http://ift.tt/2z18hu8

Submitted October 05, 2017 at 06:03PM by Ramirond

Best way to build this website using node and react?

This will be a website for m college. It will have accounts and a tree navigation system like dropbox. The files will be summaries, books, etc related to law.The files will have a comment and review section. Download will be available by torrent.This will be my first big project and any advise would be welcome.mockup: http://ift.tt/2gdHovf | http://ift.tt/2yr7cPq!

Submitted October 05, 2017 at 04:39PM by robohumano

Need a node,js steam bot that will notify my phone when a certan friend comes online

Need a node,js steam bot that will notify my phone when a certan friend comes online any ideas on what modules to use or how to do it?Thanks in advance

Submitted October 05, 2017 at 01:27PM by V6Tom

Help with twitter bot not tweeting

Hello everyone,I have created a twitter bot that simply posts the time to reddit, but when I run my program the bot only tweets once. I know twitter does not allow your bot to post the same tweet twice, but the time in my posts changes. Any Ideas why a twitter bot wont post more than once?

Submitted October 05, 2017 at 10:48AM by gbgod