Monday 30 April 2018

There's a free copy of my book Data Wrangling with JavaScript up for grabs with a subscription to the early access program. To enter, comment on my blog & tell me about your experience working with data in JavaScript.

https://ift.tt/2jgyrCC

Submitted April 30, 2018 at 10:56PM by ashleydavis75

How to Create Node.js, Express.js and MongoDB CRUD Web Application

https://ift.tt/2HCyerW

Submitted April 30, 2018 at 11:15PM by didinj

Do I need my own OAuth2 server for simple local email/password login + Facebook login?

Node v6.14.2 (LTS)

https://ift.tt/2r9oc7y

Submitted April 30, 2018 at 07:38PM by dwaxe

The hapi pal roadmap: build a healthy community around building healthy nodejs web services

https://ift.tt/2I1jTF8

Submitted April 30, 2018 at 04:33PM by devinivy

Containerizing Node.js Applications with Docker

https://ift.tt/2JvkL1N

Submitted April 30, 2018 at 04:05PM by _bit

E2E Dockerizing a MEAN Stack Application

https://ift.tt/2Fu2DCN

Submitted April 30, 2018 at 02:32PM by darkjeepers

Any suggestions about backend framework nowadays?

Before, I was using loopback but it doesn't have dashboard ui built in I search and find one: strapi It looks pretty well for my case Does anyone have suggestions or experience on strapi

Submitted April 30, 2018 at 11:35AM by tmclouisluk

npm_modules simple question

When we use node in the project, we need to do npm init, then we create a package.json and node_modules.So should we have the node_modules file in every project?

Submitted April 30, 2018 at 11:50AM by androidjunior

Getting a 404 error on reloading a react app served with express

Hi, I have this website I built with the mern stack and it's hosted on heroku, here https://ift.tt/2FsDUiy website works fine if you follow the above link. You can also navigate to all the pages, but if you try to reload any page that is not the homepage or follow a direct link to a page like this, https://ift.tt/2KpfLwM, you get a 404 error, cannot get /page/ ...I tried solving the issue by adding the below code to my server.js file, but the routing fails app.get('*', (req, res) => {res.sendFile(path.join(__dirname+'/client/build/index.html'));});Please I will appreciate any advice on how to solve this. Thanks

Submitted April 30, 2018 at 10:20AM by myrrtle

Sunday 29 April 2018

Uploading zip file to Amazon S3 results in 0 Byte file

Hello, there. I'm trying to upload a zip file, but it's resulting in a 0 byte file (You can check screenshot here). As you can see XML files are being uploaded fine. I save zipped file locally before sending it to S3. This local file size is greater than zero.SaleController.getBySaleId()function getBySaleId(req, res) { const fetch = require("../services/aws/FetchXml") const zip = require("../services/aws/Zip") const fs = require("fs") Sale.findById(req.params.sale_id).then(sale => { if (sale.cancellation_xml_url) { Promise.all([ fetch.download(sale.issuance_xml_url), fetch.download(sale.cancellation_xml_url) ]).then(xmls => { let compression = zip.addXmls(xmls) if (compression.finalize) { let zip = s3Sender.upload( fs.readFileSync(`./tmp/${compression.fileName}.zip`), sale.system_id, sale.franchise_id, sale.order_id, "exportacao", "zip" ) return zip .then(location => { return res.json({ status: "Sucesso", link: location }) }) .catch(err => { console.error(err.message) return res.status(500).json({ status: "Falha", message: "Algo ocorreu ao enviar o zip para o S3" }) }) } return res.status(500).json({ status: "Falha", message: "Algo ocorreu ao zipar os XMLs" }) }) } }) } S3Sender.jsconst config = require("config") const aws = require("aws-sdk") aws.config.update({ accessKeyId: config.get("amazon.accessKeyId"), secretAccessKey: config.get("amazon.secretAccessKeyId") }) function upload(file, systemId, franchiseId, orderId, operation, fileType) { const base64Data = new Buffer(file, "Binary") const s3 = new aws.S3() const params = { Bucket: "notas-fiscais-sistemas-acs", Key: `${systemId}-${franchiseId}-${orderId}-${operation}.${fileType}`, Body: base64Data, ACL: "public-read" } let s3Upload = new Promise((resolve, reject) => s3.upload( params, (err, data) => (err ? reject(err) : resolve(data.Location)) ) ) return s3Upload } module.exports = { upload }

Submitted April 30, 2018 at 02:22AM by giocruz

No Frameworks, No NPM | Node v8.x

hi Guys This Udemy Course promotion Today For limited time. I hope you like it. + 15 hours -The Node.js Master Class - No Frameworks, No NPM | Node v8.x(HOT & NEW) -The course is very detailed and shows exactly how to perform many tasks solely with Node.js modules in a simple yet complete way. A perfectly functional login system is made with only a handful of Node native modules, while many tutorials out there try to achieve the same thing with 20+ external modules. Brilliant. Instructor is very quick with Q&A responses. Very friendly. Does a great job of explaining the what and why as you write the code. Based on responses to my and others questions seems to be very knowledgeable on the subject and not just recycling others material. I have found some great courses and this is definitely one of the top ones. https://ift.tt/2vUf8Za

Submitted April 30, 2018 at 12:52AM by EdwardSchmitt21

A library for sorting large files using external merge sort

https://ift.tt/2I2ioX9

Submitted April 29, 2018 at 08:13PM by vangelov

What is your biggest challenge in trying to learn Functional Programming? (x-post from ruby)

Hi, I'm interested in what others are doing when it comes to learning FP - specifically:Why did you decide to learn FP?What's been your biggest challenge in learning FP so far?How much time and money have you invested in learning FP?Thanks!

Submitted April 29, 2018 at 07:32PM by carlomatteoscalzo

How to Unit test DAO layers in Node in 2018?

I've asked this before, and never got a great answer. I'm hoping things have improved since but I'm not sure...Are there any recommended ways to test the Dao layer of a project? And especially in a way that a) is easily done on a new clean system, and especially on a CI system such as Travis, and b) that allows for each test to be distinct from the others, so there are no data dependencies between tests. However, because I'm using postgres I need some way to get the correct schema set up as well.In the past I've done this in Java using an embeddable database, and then code to empty the tables between tests.What I'm curious about is if there is a good way to do this in node? I'm suspecting the answer will be something including Docker but I'm not sure if there's anything better?Cheers

Submitted April 29, 2018 at 05:41PM by sazzer

So, my blog is going well.

https://ift.tt/2vVwnJr

Submitted April 29, 2018 at 05:15PM by OzziePeck

I built an open-source algorithmic trading platform!

https://ift.tt/2FqaykR

Submitted April 29, 2018 at 01:12PM by trams_

Login attack demo: Error messages

https://ift.tt/2FokWcB

Submitted April 29, 2018 at 08:44AM by tarunbatra

[Help] Running multiple applications in the same process

If you have two separate applications you want to run on one server, let's say an express webserver and a slack bot, you could execute both of them separately, or you could require them both from a common module and execute that, so that both applications are sharing the same process.I was wondering if it is common to do the latter? I presume doing it that way would let you squeeze a little bit more performance out due to reducing the need for context switching (in a single-core environment), but I imagine that's not too significant.

Submitted April 29, 2018 at 08:51AM by ConstantinopleFett

Saturday 28 April 2018

Any way to automatically copy packages if they are already installed rather than download them

Is there a way for node to be aware of dependancies already downloaded? Like can I set up a folder where all the packages I download keep getting saved to and whenever I run npm install package it first checks if I have that package in my folder and if it is it copies the package from there instead of downloading it?Asking because I have slow internet speed and having to set up multiple react projects takes more time than what I actually spend coding. :D

Submitted April 28, 2018 at 10:07PM by novarising

Consumer Driven Contract Testing with Node.js & Pact

https://ift.tt/2GQb4Kk

Submitted April 28, 2018 at 07:46PM by ginger-julia

Why does node.js still get so much hate?

Is it just the circles I move in? Most serious and experienced back-end developers I speak to still regard node.js as an absolute joke. (IE used by hipsters and front-end cowboys)I would love to start using it for some of the microservices at my work, but almost everyone in my team is vehemently opposed to the idea. (Java Devs, Python Devs, Scala Devs, etc.)

Submitted April 28, 2018 at 07:09PM by Pringelman

[Help] Edit file without changing any other data in file

I am trying to edit a file; the program should go to a certain address of the file and write a string, overlapping any previous characters in that spot. I’ve tried fs.write, however it removes all the data in the file to write that string. What can I do?

Submitted April 28, 2018 at 06:33PM by 1plus1equalswindow_

Self-host a Node-based blog with comments and forum in under 15 minutes.

https://ift.tt/2vUf4s3

Submitted April 28, 2018 at 05:08PM by chartojs

I read an article yesterday: "Which is better, Angular, Node or React?" He just mixed frameworks with node.

That article was very lazily written. Just going over a few pros and cons. I could see the author had no clue what all these techs are. He even claims he is a C# and other fullstack developer.Ahh, the internet!

Submitted April 28, 2018 at 04:46PM by tamalweb

Help: How do I change the folder that node looks in for my .js files?

I know it might be a noobish question, but I can't figure out how to change the directory node looks in to find the .js files I'm trying to run. Any suggestions would be appreciated. Thanks!

Submitted April 28, 2018 at 04:47PM by Augler3000

Basics of creating an HTTPs server with Node.js

https://ift.tt/2JBOK8n

Submitted April 28, 2018 at 10:38AM by nulless

Help: cannot find module error

I'm trying to install a new module into my project but as soon as I install and require it, I get the errorCannot find the module 'xxxxx'Earlier, I've installed modules such as express and body-parser which are both running smoothly, but I cannot see them requiring new modules. I've looked in my node_modules folder and after I install a new module a new file for that module gets created. It seems like require is unable to require it due some weird, routing maybe? Has anyone else had this problem?

Submitted April 28, 2018 at 08:52AM by Sirzorre

Why did you choose Node.js? Tell me a little bit about your story of node..

What's your technology background? Which stacks you worked in the past. Are you an experienced developer, now into node?Or are you a newbie starting with Node?Would love to hear your thoughts.

Submitted April 28, 2018 at 09:03AM by tamalweb

Friday 27 April 2018

updating embedded documents - mongodb

i have a user model which is below{ joined: 2018-04-26T21:32:20.386Z, _id: 5ae245643da2df2c8fb8943b, username: 'Sean1', password: '$2a$10$4IFcq/.NXxL2PQsvxYSS6uZmB18jG6DgW29dwPSE01K93eKFLeGFa', __v: 0, posts: [ { i: '5ae245783da2df2c8fb8943c', title: 'Sean', chapters: [] }, { i: '5ae2458c3da2df2c8fb8943d', title: 'Paul', chapters: [] } ] } each user makes a post an a user has a option to add chapters onto that post. how can i for example update the post about paul without affecting sean and push an object into puals chapter array?

Submitted April 27, 2018 at 05:01PM by SeanCarroll17

help with using node.js and express to submit info to sql db

Hi, I'm working on a project where I need to make an html document that will submit entered info to my web api.Currently, I have my api working, heres the code:const mysql = require('mysql'); const express = require('express'); const app = express(); var con = mysql.createConnection({ host: "localhost", user: "root", password: "", database: "classnew" }); //you may get an error here, try changing database: "classnew" to something else. I'm using "classnew" because when I want to view my pokemon.sql in cmd prompt, I type database classnew; and source pokemon.sql; var home = app.get('/', (req, res) => res.send('Welcome to my Pokemon API. We are using only gen 1 pokemon here! Use localhost:3000/pokemon to view your pokedex!')); var pageOne = app.get('/pokemon', function(req, res){ con.connect(function(err) { if (err) throw err; console.log("Pokedex Connected!"); con.query("SELECT * FROM pokemon", function (err, result) { res.json(result); if (err) throw err; //console.log(result); }); }); }); var info = app.get('/pokemon/:id', function(req, res){ var id = req.params.id; con.query("SELECT * FROM pokemon WHERE id = " + id, function (err, result) { res.json(result); if (err) throw err; console.log(result); }); }); app.listen(3000, () => console.log('Example app listening on port 3000!')) and here is my HTML document that I need to use to submit new info to my SQL database:

Add a new pokemon here. Please separate multiple inputs with a comma. If null, please use '-'.

Enter the name of new pokemon:



Enter its type:



Enter what it is immune to:



Enter what it strongly resists:



Enter what it resists:



Enter what it is weak to:



Enter what it is very weak to:



Enter its evolution name:



I'm sorry that the project is on pokemon, atleast I'm only doing gen 1 pokemon. ;PAny way, i need to be able to open my forms.html, fill in the form boxes, click submit and have it INSERT INTO my sql document (will paste my sql db at the send), and also be able to use my API to see that newly submitted info.I DO NOT WANT CODE SNIPPETS, I WANT TO LEARN AND UNDERSTAND HOW THIS WORKS, SO ANY RESOURCES WOULD BE MUCH MORE BENEFICIAL TO ME THAN A COPY PASTA. THANK YOU.heres my sqldb: CREATE TABLE pokemon (id INTEGER PRIMARY KEY, name TEXT, type TEXT, immuneTo TEXT, strongResist TEXT, resits TEXT, weakTo TEXT, veryWeakTo TEXT, evolutionName TEXT); /* id | name | type | immuneTo | strongResist | resists | weakTo | veryWeakTo | evolutionName | */ INSERT INTO pokemon VALUES (1, "Pikachu", "Electric", NULL, NULL, "Electric, Flying", "Ground", NULL, "Raichu"); INSERT INTO pokemon VALUES (2, "Haunter", "Ghost, Poison", "Fighting, Normal", "Poison", "Grass", "Bug, Ghost, Ground, Psychic", NULL, "Gengar"); INSERT INTO pokemon VALUES (3, "Kadabra", "Psychic", "Ghost", NULL, "Fighting, Psychic", "Bug", NULL, "Alakazam"); INSERT INTO pokemon VALUES (4, "Snorlax", "Normal", "Ghost", NULL, NULL, "Fighting", NULL, NULL); INSERT INTO pokemon VALUES (5, "Diglett", "Ground", "Electric", NULL, "Poison, Rock", "Grass, Ice, Water", NULL, "Dugtrio"); INSERT INTO pokemon VALUES (6, "Geodude", "Ground, Rock", "Electric", "Poison", "Fire, Flying, Normal, Rock", "Fighting, Ground, Ice", "Grass, Water", "Graveler"); SELECT * FROM pokemon;

Submitted April 27, 2018 at 05:37PM by extDASH

Why Node.js is a good choice for your next web app?

https://ift.tt/2r3B8ff

Submitted April 27, 2018 at 12:36PM by galkowskit

What Exactly is Node.JS? - JavaScript Works Learn Content

https://ift.tt/2vQQbh5

Submitted April 27, 2018 at 11:30AM by JavaScriptWorks

[JOB] One of the most exciting crypto start-ups in Europe, valued at over $350million needs high-level Node.js Engineers in Berlin!

https://ift.tt/2r4uQer

Submitted April 27, 2018 at 10:29AM by 3rdkulturekyd

Verify that a request is from Google crawlers using Google's DNS verification steps.

https://ift.tt/2Hwk0ou

Submitted April 27, 2018 at 09:51AM by roccomusolino

Mathias Bynens - V8 Internals for JS Developers

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

Submitted April 27, 2018 at 08:00AM by harlampi

Thursday 26 April 2018

help with update embedded documents - mongodb

i hav an array of posts which you can see below"posts" : [ { "i" : "5ae245783da2df2c8fb8943c", "title" : "Sean", "chapters" : [ ] }, { "i" : "5ae2458c3da2df2c8fb8943d", "title" : "Paul", "chapters" : [ ] } ] how do i push an object into the chapters array of any given object. it mustn't affect all objects. im gonna be using the ids to update them do you know any methods to use?

Submitted April 26, 2018 at 11:10PM by SeanCarroll17

How to Create RESTful API Easily using Node.js, Express.js, Mongoose.js, and MongoDB

https://ift.tt/2JtWngP

Submitted April 26, 2018 at 11:27PM by didinj

Things I like about node

Here are some of the things that I think makes node amazing compared to other languages. If anybody would be so kind, I'd be interested to know why other languages don't have these things... or why these things aren't actually as great as they seem.Local DependenciesInstalling dependencies in an arbitrary system folder seems ridiculous and I don't know why any package manager ever did this. I understand why it sometimes makes sense, but the fact it's the default for other scripting languages like python is ridiculous.No Namespace PollutionIn node, when I require a file, I assign it to a variable. In almost every other language I import a package... then call something of a completely different name. When reading someone elses code I often have no idea where the code for a function call is.Explicit CodeNode, and the majority of popular packages do nothing by default. So my application starts as a blank page, then does only what I tell it to. Compare that to php, where a default server config is doing 1000 things, 990 of which are completely unnecessary and likely introduce vulnerabilities. Or Django, where my code is basically a plugin and the actual application is basically Django which does 1000 things.AsyncCallback hell is a myth. Async is so embedded in node, and works so well.Less is MoreOther languages seem to implement the same solution to simple problems many times. Node doesn't. For example Java has/had many dictionary type objects... half of which are deprecated. Simple things like http, which should be a standard in all languages often aren't... then there's 50 different packages you have to choose from. Node has many options for packages, but the standard libraries cover all the basics really well and don't have multiple versions of the same thing.

Submitted April 26, 2018 at 06:48PM by Buck_Da_Duck

So how is Meteor doing right now?

I remember reading some posts about Meteor dying around a year ago... I didn't learn it or anything and I was wondering what I should learn alternatively to it. I heard it had a very strict environment as well... is that true?What is everyone using nowadays? As a front end framework I personally use React but I know meteor is a full stack framework..

Submitted April 26, 2018 at 04:37PM by mikebpechousek

is strapi more likely api gateway management (like kong, tyk)?

No text found

Submitted April 26, 2018 at 03:14PM by hbakhtiyor

Why wasn't the node_modules packages deleted after I ran this command in the terminal?

for package in `ls node_modules`; do npm uninstall $package; done; According the tutorial, the node_modules folder shouldn't include anything after you delete all the modules except the bin folder but they're all still there. I was doing all of these things in a project folder not globally.

Submitted April 26, 2018 at 03:28PM by ASamir

NodeJS 10 current version installing NPM 5.5.1, not 5.6.0 (Windows installer)

Hi all, What am I doing wrong? I just downloaded the current version of nodejs, v10. I am using the Windows installer. See the screenshotAgain, it's probably my fault. Any help would be appreciated.My preferred result is to have NPM 5.6.0 installed along with nodejs v10. It says so on the download site: https://ift.tt/1YUr9RB "Latest Current Version: 10.0.0 (includes npm 5.6.0)"Thanks in advance! - Chris

Submitted April 26, 2018 at 01:38PM by Anotherwan

Top 10 Node JS Framework

https://ift.tt/2FlxaD6

Submitted April 26, 2018 at 09:01AM by re-zero0

Wednesday 25 April 2018

need some help asap!

need some help with updating an array inside an object that is inside of an array...here is my model itll explain it better"posts" : [ { "title" : "Book Name", "chapters" : [ ] }, ] how do i push information into the chapter array? i can find the correct object using the title i just dunno how to push the arrayim using mongodb btw

Submitted April 25, 2018 at 10:04PM by SeanCarroll17

Hiding API keys in the frontend?

No text found

Submitted April 25, 2018 at 09:15PM by OzziePeck

Adding methods to class in external file

If I define a class in file1.js, how can I add methods to that class in file2.js? Of course, the class is exported.

Submitted April 25, 2018 at 09:52PM by rickgarg

Simple server causing Max Listener warnings in console

I have the following server code ( sans imports and some process info )app.use(express.static(__dirname)) app.use(bodyParser.json()) app.use(form()) app.post('/api', (req, res) => { db.posts.push(Object.assign({ submitted_on: Date.now() }, req.fields)) res.json({ data: { id: db.posts.length - 1 } }) }) app.get('/api', (req, res) => { if (req.query.id) { return res.json({ data: db.posts[req.query.id] }) } return res.json({ data: db.posts }) }) app.listen(5000, () => console.log('Hello!')) When I start this server and go to index.html, everything is great. However, after a few minutes, I get a max listener. You should increase it warning printed in the console.What would cause a single client cause the max listeners issue with the above code? Am I doing something wrong with this simple server?

Submitted April 25, 2018 at 06:58PM by cirsca

Build a RESTful API Using LoopBack

https://ift.tt/2FfO9Xl

Submitted April 25, 2018 at 07:02PM by AdministrativeBall

RxJS v5.x -> v6 Update Guide

https://ift.tt/2vIDiFP

Submitted April 25, 2018 at 07:28PM by unquietwiki

Dynaflow, a NodeJS driver for DynamoDB

https://ift.tt/2HRLsk6

Submitted April 25, 2018 at 07:21PM by slowernet

Getting Started With Google Cloud Functions and MongoDB

https://ift.tt/2HunZWw

Submitted April 25, 2018 at 06:23PM by code_barbarian

Build and deploy a social network with Node.js, Express, React, Redux & MongoDB. Learn how to put it all together.

https://ift.tt/2vNDgfX

Submitted April 25, 2018 at 06:47PM by martianba

DD:MM:YYYY, HH:MM:SSS using moment?

Is there a format for this? I have the following atm:var date = moment().format(‘MMM Do YYYY, h:MM:ss a’);I want to add milliseconds up to 3 so like 4:43:221 PM

Submitted April 25, 2018 at 04:43PM by v1zed

Proxies and Reflection in JavaScript

https://ift.tt/2qZZxl4

Submitted April 25, 2018 at 05:32PM by nucleocide

Sharing Code Between Projects: Lessons Learned In The Trenches

https://ift.tt/2qZJAuT

Submitted April 25, 2018 at 03:23PM by JoniSar

Single Page App Routing Question

Hello,Not exactly sure which subreddit to ask this question but I believe it may be fitting in the node subreddit.I am creating a single page application using express/react/mongo/node. In my development server, my routing worked flawlessly. I could reload any page and it would load the appropriate content, I could go back and forth in history and it'd be fine.Currently, I'm trying to deploy my app with digitalocean, I've set up an Ubuntu server, installed mongo, node, and all that jazz. The website loads (currently just running it through pm2 on a random port) I can go back and forth and click links. BUT if i reload the page i get the good ol' 'Cannot get /therestoftheurl'My index.js contains the following:app.use(express.static(__dirname + '/public'))And near the bottom:app.get('/', function(req, res){res.sendFile(__dirname + '/public')})Anyone know why this would all the sudden be any issue?

Submitted April 25, 2018 at 10:21AM by dhyd

How To Run Background Process In Node.js Using RabbitMQ?

https://ift.tt/2JpFW5i

Submitted April 25, 2018 at 10:37AM by Zeolearn

Using fs to get dir and file names into a JS object

Imagine you have a simple directory and file structure that looks like this.├── dir1│ ├── fileA│ ├── fileB│ └── fileC├── dir2│ ├── fileD│ ├── fileE│ └── fileF└── dir3├── fileG├── fileH└── fileIYou want to scan these directories and return an array of JS objects that looks like this[{directory: dir1, files: [fileA, fileB, fileC]}, {directory: dir2, files: [fileD, fileE, fileF]}, {directory: dir1, files: [fileG, fileH, fileI]}]How would you go about achieving this with node?

Submitted April 25, 2018 at 10:55AM by G_pounder

Nodejs

Do you want to dexterous solution related nodejs development? Connect with Habilelabs the best development company of nodejs development.https://ift.tt/2F81d2F

Submitted April 25, 2018 at 09:10AM by nisha_arora

Node v10 is Here - Feature Breakdown!

https://ift.tt/2HnWI4g

Submitted April 25, 2018 at 09:27AM by andreapapp

Tuesday 24 April 2018

Question about Redis and an API

I am making a small mobile application using Node, Express, Mongoose/Mongodb, Redis, and React. I'm connecting to a rest api that updates every 30 seconds but I don't want to spam the api with to many request and lose my api key. What is the easiest way to do one request to the external api every 30 seconds and store the data in redis. Then create my own internal api the stores the redis data. I am trying to figure out the best way to do this.

Submitted April 24, 2018 at 11:20PM by Social_Justis

Node v10.0.0 (Current)

https://ift.tt/2Ho1aEe

Submitted April 24, 2018 at 09:36PM by dwaxe

Convert PPT/PPTX to JSON

Hi, I would like to know if there are a good package for take from a PowerPoint presentation and get a JSON for example, with the texts and images and the positions. Something like a parser or similar. Thanks.

Submitted April 24, 2018 at 07:23PM by chemitaxis

How to have two versions of node installed? Or a later version installed for a specific project?

I'm working on an open source project that isn't compatible with node v9 yet. So I need to install node 8 in order to work on this project, but would like to keep my node up to date everywhere else. I currently have node 9.8.0 installed through Brew. Could anyone point me in the right direction for something like this?Thanks!edit: Alternatively, I would be willing to just downgrade my version. Is there a simple brew command to pick the version I want?

Submitted April 24, 2018 at 08:24PM by WritingStufff

'cheerio' and web scraping

https://ift.tt/2vJVnDv

Submitted April 24, 2018 at 08:25PM by koenigsforst

What’s New in Node 10 – Node.js v10 Released Today!

https://ift.tt/2JpVs0P

Submitted April 24, 2018 at 05:42PM by treyhuffine

MySQL Document Store CRUD Quick Start

https://ift.tt/2qVwXkv

Submitted April 24, 2018 at 04:21PM by johannes1234

How JavaScript works in browser and node? – Medium

https://ift.tt/2FdttPD

Submitted April 24, 2018 at 04:34PM by Fewthp

Node v10 LTS is Here - Feature Breakdown!

https://ift.tt/2HnWI4g

Submitted April 24, 2018 at 04:00PM by andreapapp

How would you handle refreshable timeouts in a clustered node app?

I'm trying to create a timeout system which can be extended by certain actions, the problem is that those actions may appear not in the same process where the timeout was created.Example: think of a bot that asks a question and expects an answer within 30 seconds. If a user enters an input, the timeout is refreshed (or removed}. In single process app its not a problem, but when it is clustered, well it gets problematic.Anybody has ideas how this can be implemented?

Submitted April 24, 2018 at 02:36PM by ahrismith10

Node v10 LTS is Here - Feature Breakdown!

https://ift.tt/2HnWI4g

Submitted April 24, 2018 at 02:38PM by andreapapp

Node.js Top 10 Open Source of the Month (v.Apr 2018)

https://ift.tt/2HOCmER

Submitted April 24, 2018 at 12:56PM by kumeralex

Build a “Serverless” SMS FAQ Bot with Node.js, MessageBird and StdLib in 6 Minutes

https://ift.tt/2vFpw6Z

Submitted April 24, 2018 at 09:12AM by jweb234

Help with npm

So if i install a package globally, for example typescript (nmp install -g typescript), i can just type the command "tsc" and it works. But can i still do this with a package installed locally, or do i have to specify the path like "./node_modules/typescript/bin/tsc" ?

Submitted April 24, 2018 at 06:34AM by DenuvoHater332

Advanced Node.js Project Structure Tutorial

https://ift.tt/2HaJY1F

Submitted April 24, 2018 at 08:56AM by harlampi

Monday 23 April 2018

Database Questions

I'm currently working on my first large full stack web project. However, I'm running into a problem where I believe I made some mistakes with how I wanted to store when I was still working things out, and even if my data is small enough that it probably doesn't matter, I'd still like to know how I should be doing things for the future, even if it isn't worth uprooting my problems to fix right now.Currently I'm using MongoDB, but I'm pretty confident that I should have used a relational database. When I'm writing schemas I feel like I'm trying to emulate SQL. I have no previous experience in any database besides mongo, but I'm managing lots of relationships between documents, and my data seems pretty structured overall. Does it sound like I should have gone with a RDBMS? How can I tell this in advance before my future projects?In the mean time, I'm still handling relationships within Mongo. What is the best way to do this. For example, my website consists of teams that consist of 5-10 players. Should I store the team id in the player document? Should I store an array of players in the team document? What are the advantages of doing one vs the other? Are there advantages of doing both?Similar questions, but on a different scale. Every game consists of 10 players, and players have connections to many games. How do I handle these relationships? What is the best way to query for a player's complete game log? I have to store a player's game stats in that game document, but should I cache this information in the player document as well?I hope I provided enough context that questions can be answered. Thanks to anyone who has read this and can help me out.

Submitted April 24, 2018 at 01:25AM by kc9kvu

PKI.js : a Node-friendly PKI security provider

https://ift.tt/2HngexF

Submitted April 24, 2018 at 12:17AM by unquietwiki

Questions about node..coming from php

Hey everyone, I just wanted to get some thoughts from developers who are using node more professionaly than myself.I find myself having great difficulty getting around the async situation. I've written a simple app in node, but I find myself using promises frequently. So that I have a string of .then() essentially making things seem syncronous. Is this common? Is this how you handle data in node? Or is it more common(the only other way I see) to create multiple routes to get different data elements and handle most of that via forms and ajax requests on the client side. Example App.get('articledata',function(stuff){dostuff(stuff)}App.get('adData',function(stuff){dostuff(stuff)}Etc etc2. Whenever I look at for support on stackexchange or elsewhere first advice is to npm another module. Is this common practice to have multiple modules for even simple apps.I wrote a blog app but I found myself including Express, body-parser, cookie-parser, JWT mySql, and md5.And from that I have over 1 hundred modules now, mostly from express.Is this normal, or am I doing something wrong? I really don't like seeing a project and 99% of my code not being my code. And it seems like a debug hell if I ever run into a problem. Hundreds of dependencies to look through.

Submitted April 23, 2018 at 11:39PM by freakwoods

The State of Node.js Security - April, 2018

https://ift.tt/2HqJyDl

Submitted April 23, 2018 at 10:54PM by gorgerson

The Beauty Of Persuasive Design (User Interface Design)

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

Submitted April 23, 2018 at 09:27PM by dyf360

Node.js zero configuration debugger

https://ift.tt/2qK5hiH

Submitted April 23, 2018 at 09:31PM by rodrigogs

Dialect needs to be explicitly supplied as of v4.0.0

Hello, there! I'm trying to connect to my PostgreSQL server and it seems something wrong is happening with Sequelize connection. I can't figure out what it is. I'm providing the dialect, but it doesn't work...Dialect error screenshotsequelize.jsconst config = require("config") const Sequelize = require("sequelize") const sequelize = new Sequelize( config.get("postgres.database"), config.get("postgres.username", config.get("postgres.password"), { host: config.get("postgres.host"), dialect: "postgres", operatorsAliases: false, pool: { max: 5, min: 0, acquire: 30000, idle: 10000 } }) ) sequelize .authenticate() .then(() => { console.log("Connection has been established successfully.") }) .catch(err => { console.error("Unable to connect to the database:", err) }) module.exports = sequelize

Submitted April 23, 2018 at 07:49PM by giocruz

ServiceNow Get Rest call.

We are trying to crawl our ServiceNow KB with a Bot. Can't figure out how to get it to call the Rest Table and can't find any documentation on this. Any help would be greatly appreciated.

Submitted April 23, 2018 at 04:45PM by extremezombix

http-Proxy : I can proxy the index.html, but css and js not found

Hi there!So I'm trying hard to set up my production env on windows server.I'm using express to serve a React app with static file, and I'm using http-Proxy (also tried the express version) to reverse proxy my app.My issue : The index.html file is proxied, but then the html file try to get my .js and .css file. Sadly, he tried to do it on my proxied url.Ex :React app url : localhost:2530Proxy url : localhost/testMy index.html is loaded, but then it tries to open localhost/test/main.js and localhost/test/main.css. He can't find them as both those files are at localhost:2530.I can't seem to find a solution. :(Thank you!

Submitted April 23, 2018 at 03:09PM by Kardiamond

Fabulously kill processes

https://ift.tt/1I6tvr6

Submitted April 23, 2018 at 03:22PM by sindresorhus

[JOB] Advanced Node.js and Blockchain in Berlin!

https://ift.tt/2HpOqgo

Submitted April 23, 2018 at 03:48PM by 3rdkulturekyd

Emittery - Simple and modern async event emitter

https://ift.tt/2AbFxlM

Submitted April 23, 2018 at 03:24PM by sindresorhus

How to wrap a callback function with async/await?

I need to use a function from an 'old' module that uses callbacks. It's something like this:async function myWrapper(dataToParse) { myOldfunction(dataToParse, (err, parsedResult) => { if (err) { throw err; } console.log(parsedResult); }); } I need to modify this, so that instead of logging the result to the console, the parsedResult received by the callback becomes the return value of the wrapper.I've got no idea how to do it, can I get some help?

Submitted April 23, 2018 at 02:34PM by kace91

Best fullstack tutorial for Express + React + Webpack

Hi guys,I know that this question has been asked before, but most of them is old or not what i am looking for. I am looking for a fullstack tutorial, which contains expressjs, reactjs and webpack configuration. Also environment setup like setting up a delicious dev environment.Do u guys know a nice tutorial? Which is not old or 20hours of video. Btw, i know the basics of those, but not i depth.Regards.

Submitted April 23, 2018 at 02:33PM by Muhaki

Fatih Acet: The growth of Vue.js is phenomenal 😯

https://ift.tt/2FxNpAY

Submitted April 23, 2018 at 01:18PM by FrontendNation

Book for beginners

Hey guys, I've started working with node.js after 3 years with rails, I am thinking about reading some books/info to get to know basics of nodejs deeper, I found Beginning Node.js which was released in '14, won't it be too outdated? Thanks for recommendations, much appreciated!

Submitted April 23, 2018 at 09:32AM by evngcdr

Live streaming. Where to store video and other questions.

I’m trying to set up a live streaming app and I figured out that it would be better to set up a red5 pro server along with the node app since there isn’t a lot of examples of standalone node live streaming apps. Is this the general direction you would take as well or am I just missing something.Let’s say I set up the red5pro server. Where would I put all the video to be served to users that missed the live streams? I first though of cloud providers but I wonder how expensive it would start to get.Context. Want to livestream fitness classes and show pre recorded ones as well.

Submitted April 23, 2018 at 09:58AM by dwise97

Sunday 22 April 2018

node-help v2 - A custom Node.js REPL with the latest documentation.

https://ift.tt/2K6lyak

Submitted April 23, 2018 at 02:28AM by _foundling_

Started a job as a node.js developer. Looking for some good reference resourcers.

Just got my first job as a node.js developer. This is my first role as a backend developer so I'm looking for some resources that i can use as a day to day reference about things like app architecture, scaling, design patterns (we use MVC), OOP in node and just how to write better code with node in general. Thanks!

Submitted April 22, 2018 at 11:58PM by Prot00ls

Any libraries for detecting identical images even if then they are different sizes?

Imagine an image of a tree. Now imagine a copy of that image that is scaled 50% down. Are there any libraries that would output "identical = true"? Are there maybe even ones that output the likeliness of them being the same?

Submitted April 22, 2018 at 11:18PM by DontDisneyMyPixar

What do I use to make an application(.exe) from my project?

I tried PKG and NEXE but I'm not sure how to make an application with everything in it and with everything I mean the images, styles, etc

Submitted April 22, 2018 at 08:44PM by FlyingChinesePanda

When to use Servers & when to go Serverless ?

Currently trying to differentiate when to use Servers & when to go Serverless.Serverless will scale infinitely, although it has 1 small cost of cold starts but if the site is used regularly then cold start is not needed.Servers are inherently costly. Even if we don't use it to its full potential we need to always choose a higher plan than our current usage.I want to know when can we go full Serverless.Like I have 1 app where the flow is like -User clicks on SignInEmail is sent to the user with Magic LinkAfter Magic Link is clicked, user is logged inUser can then buy a productAfter payment, user can download the productUser can LogoutCan this be done serverless ?Also, which websites would be Serverless & which would need Servers ?

Submitted April 22, 2018 at 08:42PM by deadcoder0904

Questions regarding module.exports

Hey guys,when I use module.exports in any of my modules, for example the following code:const mongoose = require('mongoose'); const Grid = require('gridfs-stream'); const database = 'mongodb://127.0.0.1:27017/test'; const connection = mongoose.createConnection(database, null, (err, db) => { if(err) { console.log(`Error occured during connection to the database ${err}`); } else { console.log(`Connected to the database: ${database}`); } }) module.exports = {connection}; I require the shown module in my entry.js-file.When exactly will the above code execute? When requiring it? If I don't require the export in my entry.js, the code won't execute ever, right?Do I need to require all the the dependencies I required in my exported module in my entry.js file? To my understanding I don't, as long as I'm not (in this case mongoose) accessing any of mongooses features, which would require the mongoose package, right?Let's assume I require the module above in another file, for example test.js, would I receive another instance(another connection) to the database or is the instance shared throughout my code?

Submitted April 22, 2018 at 08:46AM by Fasyx

MEAN Stack Starter: Angular 5 and Loopback 3

https://ift.tt/2xn3cux

Submitted April 22, 2018 at 08:27AM by immortalcoder

Saturday 21 April 2018

Web Dev as Partner for Meme Website

Greetings! I hope you are fine and doing good.tl;dr: I am looking for a web developer to partner up with for a meme website which I wanted to get built but never got to since 2 years. You just make website and I do traffic,hosting and domain etc and we share revenue.I started searching for ways on how to earn money online july 2012. I am not sure if it was worth it or not or it would be in the future but it has ruined my student career. After a year I finally got my payment (regrettably and unfortunately) by using a blackhat method. After 4 years of searching for an efficient way of earning (whitehat style) money online I concluded that the best and most effective choice was to do it with a website. In the timespan of those 4 years, I never earned much and whatever I earned was by using fraud methods and was blinded by that money but I'm just making excuses.The best bet was to now make a meme website that could become profitable in my mind, sure it may not be such an easy pie but I was and still am ready to put in time and effort. Like I said I did not earn much and whatever I had earned was just used for food.I had invested and wasted money in facebook page ads which amounted to 500$. Then I looked for 9gag and memecenter clones and soon enough found one. I spent that 500$ on that script and added features and improvements but then suddenly I realized that I had made a big mistake.I knew if i had to make it work, make it big it had to be unique and fresh idea and not some exact copycat crap. I asked for professional developers and the starting price was 1500$. I was bummed on how and where could I gather that much. It was impossible for me but I still managed to collect roughly another 500$ somehow. I went for the cheap guys and someone from reddit scammed me 190$ as upfront payment, then paid 230$ for a basic version which was made up on shitty raw code and the remaining got locked in paypal. You could say I wasted near 1700-1800$ on this thing.Now I dont have any money, only this phone that could go for 150$ max. If I were to start having a job then it will take me 12-15 months to accumulate 1500$ for the website. Or I could find a partner developer for this project and we could share the revenue according to our terms. You just need to make the website, I will handle the rest like traffic,domain, hosting etc.Dont tell me to get a job, I will be getting one in a month or two.Dont tell me to learn programming because I will not have time for it once I start my job.and yeah this is last repost.

Submitted April 22, 2018 at 02:23AM by blacktea01

Getting started with Node.js: Introduction for beginners

https://ift.tt/2K6nT59

Submitted April 22, 2018 at 12:01AM by nulless

Many buttons doing to same thing but for different 'accounts'

Hi,I have a button when press you get +1 behind your name and pressed again it just counts up. I also have multiple names, how do I link the button to the name, if you press on button2 only name2 will count up.

Submitted April 21, 2018 at 10:34PM by FlyingChinesePanda

So the visual coding environment Max 8 is adding Node as a tool. Would anybody here be able to explain to me what that means for Max?

I don't know much about Node and Max is rather vague on what all I'll be able to do with Node. Just curious if anybody has any thoughts on the matter. Thanks!

Submitted April 21, 2018 at 09:20PM by ComposerShield

Ratlog.js – JavaScript Application Logging for Rats, Humans and Machines

https://ift.tt/2qS2zYe

Submitted April 21, 2018 at 08:21PM by jorinvo

svr, development server for express

https://svr.js.org

Submitted April 21, 2018 at 06:23PM by kikobeats

Send a command from terminal to running node app?

I'm running a website on Express and want to be able to send commands to the running server in order to do specific things like reload a config or kick out a client. First, is this the best approach? If so, how can it be done?

Submitted April 21, 2018 at 07:05PM by NovaKevin

NodeJS Live Fortnite Bot for Discord

https://ift.tt/2K1I4kG

Submitted April 21, 2018 at 04:20PM by micky2171

A lighting fast cache manager for node with least-recently-used policy. Implemented using doubly-linked-list and hashmap with O(1) time complexity for gets and sets.

https://ift.tt/2F5xohg

Submitted April 21, 2018 at 11:22AM by paashabhai

Friday 20 April 2018

Best way to avoid sending json from the server in plain text to the client?

No text found

Submitted April 20, 2018 at 10:46PM by PlayerAPI

Hot reload on express

Anyone doing hot reload of rutes on express for dev env? i tried to do it but created some memory leaks in project

Submitted April 20, 2018 at 09:07PM by vfistri2

Best database for a chat application?

https://ift.tt/2F4kBf5

Submitted April 20, 2018 at 08:03PM by impossibletogetagf

Some help / advice on this project structure would be appreciated

Hello all, so I made a simple project that contains an express server and a create-react-app client side.I was wondering what are your thoughts on this structure that I set up. Essentially you open two terminals and run the server and client side separately and develop like that. You could in sense, add a npm script or other misc script (maybe for building?) in the root dir to run both the client and server instead of opening two terminals...but I'm not sure how to do that (sure npm scripts ...) / what is the best way to do that.Most express and React start kits like these put all the server code in one directory and throw the client as one of the many folder. I like to keep server and client separated since they are both different projects. I understand that in the Node / JavaScript world there are many many ways to do things, but I am just wondering what you guys think.I setup the server folder with a very minimal express code so in sense, you could completely delete the code inside the server dir and put in whatever server you want in there, doesn't even have to be Node based I'd guess.Also, any guides on making code for production ready like with Docker, or maybe even a guide on CI/CD tools would be great, I wanna make this project for anyone to have an easy / ready to go full on development and production process. Any guides I should look at, books? Or if anyone wants to help that's fine too! Thanks again: )

Submitted April 20, 2018 at 06:52PM by HappyZombies

I want to hire mid & senior level Node.js Engineers in Austin, where is the best place to find you?

Pardon me for inserting myself in your group (slap my wrist), but when I have a question, I prefer to go straight to the experts.Where would you be lurking if you were open to new opportunities?

Submitted April 20, 2018 at 06:59PM by lratoday

Passport Auth0 verifying token

How does my api server using passport verify a token sent by the client? How can it know that the token being received is indeed issued by auth0?Security wise, how is Oauth superior, than a basic jwt from username and user ID and decrypting it to verify.

Submitted April 20, 2018 at 07:10PM by karthick_doosra

Paying in instalments through Stripe with Nodejs 8.10 and Serverless

https://ift.tt/2qNg8t7

Submitted April 20, 2018 at 07:42PM by krisquigley

Ready for production : How should I proceed?

Hi there!So I have :Nodejs RestAPIReactJS app with webpack.I have been doing Nodejs apps for 12 month now, and it's the first time I have to get one in production.The issue : I have no idea how to do it. My tutorial doesn't touch this part.It's a local app, and I have to install it on a Windows 2016 server.How should I proceed?I also don't want my user to use a specific port, I want them to use the default one (80). But I will have multiple apps on the same server in the futur, so I need to do like php : server/app1 and server/app2 point to different app.Thank you guys! I don't know why I can't find anything on the subject!!

Submitted April 20, 2018 at 06:43PM by Kardiamond

best approach for building an queue system for video encoding jobs

Hey I'm working on building a service that involves video encoding. I haven't done any webdev outside of just having a single server serving simple apis, so working this all out is kind of confusing.I intend to have a website where users can request an encoding job. The node rabbitmq driver I messed with seemed.. confusing. I'm wondering if there are other options out thereI see things like bee-queue that look a little more pleasant. I'm confused on how using redis as the underlying system for a queue works. If the server running redis dropped, wouldn't all of the jobs waiting be lost?Let me know what you use and any other advice you may have regarding this. Any help is appreciated :--)

Submitted April 20, 2018 at 04:47PM by tehoreoz

How to avoid the assignment to property of function parameter (Express + JWT)

Hey guys,I have been working for a short time with JavaScript and Node, building APIs with Express is completely new to me.I started to use ESLint to improve my code, but at one point I can not fix the error ESLint is throwing:"Assignment to property of function parameter 'req'. (no-param-reassign)"function verifyToken(req, res, next) { const token = req.headers.authorization; if (typeof token !== 'undefined') { req.token = token; next(); } else { res.sendStatus(403); } } How should I write my verify-function which assigns the token to the request, that I can verify the token itself in the next function?Thank you

Submitted April 20, 2018 at 05:36PM by Freddyan

How to call a function using the value of a string variable?

I have the name of a function as a string. How do I convert that into a function pointer so I can call it later?

Submitted April 20, 2018 at 02:43PM by kaolay

questions about docker + node practice (best place to keep node_modules etc.)

https://ift.tt/2HwS2MP

Submitted April 20, 2018 at 01:49PM by vingrish

Create A YouTube-style Recommendation Engine With Node & Vue

https://ift.tt/2H2cSjE

Submitted April 20, 2018 at 07:46AM by r-wabbit

Thursday 19 April 2018

what is "RangeError: Maximum call stack size exceeded"

I am writing some code in nodejs, but every time I run it, I get the same error:/path/to/home/Downloads/Boxez/node_modules/has-binary2/index.js:1 (function (exports, require, module, __filename, __dirname) { /* global Blob File */ ^ RangeError: Maximum call stack size exceeded at hasBinary (/path/to/home/Downloads/Boxez/node_modules/has-binary2/index.js:1:1) at hasBinary (/path/to/home/Downloads/Boxez/node_modules/has-binary2/index.js:56:59) at hasBinary (/path/to/home/Downloads/Boxez/node_modules/has-binary2/index.js:56:59) at hasBinary (/path/to/home/Downloads/Boxez/node_modules/has-binary2/index.js:56:59) at hasBinary (/path/to/home/Downloads/Boxez/node_modules/has-binary2/index.js:56:59) at hasBinary (/path/to/home/Downloads/Boxez/node_modules/has-binary2/index.js:56:59) at hasBinary (/path/to/home/Downloads/Boxez/node_modules/has-binary2/index.js:56:59) at hasBinary (/path/to/home/Downloads/Boxez/node_modules/has-binary2/index.js:56:59) at hasBinary (/path/to/home/Downloads/Boxez/node_modules/has-binary2/index.js:56:59) at hasBinary (/path/to/home/Downloads/Boxez/node_modules/has-binary2/index.js:56:59) This error seems like it's being thrown from the has-binary2 module. On inspection, the has-binary2 module is a dependency of socket.io (which I am using in my app). I can't figure out what is causing the error, let alone figure out how to fix it. Does anyone know why this error is being thrown, and how I would go about fixing it?

Submitted April 19, 2018 at 11:58PM by qqazxswedc

Looking for input and possible collaborators on a comprehensive file system management tool for local and remote machines.

The tool is called fsgodNPM: https://ift.tt/2K16uuE https://ift.tt/2JaHEaG me if you'd like to help me work on this, as it's gotten quite large and too complex for me to cover every base

Submitted April 19, 2018 at 11:20PM by MisterWowie

JavaScript Prototype Poisoning Vulnerabilities in the Wild

https://ift.tt/2HfsHDJ

Submitted April 19, 2018 at 05:37PM by nucleocide

Advice on MySQL solution for node

Hey all,Been thinking on starting a new nodejs project with MySQL and i am a little lost between all the potential solutions for ORMs , migrations and so on. Do any of you use something like, say, Sequelize , in production or know of anyone else that does without too many issues?I could just dive in and use one at random but i'd rather know im using something stable to begin with.Thanks a bunch

Submitted April 19, 2018 at 04:14PM by Malforked

Sequelize, Knex, Bookshelf? What do you prefer when working with PostgreSQL?

Feel free to suggest any others. For example, Objection looks good too...

Submitted April 19, 2018 at 02:43PM by impossibletogetagf

saito - a big data blockchain implemented in node.js

We are pleased to announce the release of the Saito whitepaper and technical demo:http://saito.techSaito is a terabyte-level blockchain that can run real blockchain applications on chain, implemented intirely in node! Saito's javascript 'DApps' (not smart contracts) can be anything from email or social networks to payment channels, and other data-heavy web services.On Saito, developers do not need Google-scale hardware to run decentralized services that can outcompete their centralized peers. Saito applications run in browser, the chain provides routing and bandwidth.Demos showcasing how Saito works and what it does are available on our site, along with working code for developers interested in building applications on the network.To our knowledge Saito is the first and only consensus mechanism that is 'economically perfect', that is, not suffering any collective action problems that deter revenue-earning nodes from spending money to support the public network. We welcome feedback on the network and software design.We have lots of documentation on the site and code to hack on on github, please check us out. Oh, and, we are hiring! (org.saito.tech/jobs)

Submitted April 19, 2018 at 03:07PM by richard-at-saito

Input wanted - Node API structure that enforces REST

https://ift.tt/2HcCeez

Submitted April 19, 2018 at 03:26PM by backend_node_dev

TypeORM 0.2.0 is released

https://ift.tt/2qJKP1g

Submitted April 19, 2018 at 01:28PM by pleerock

Which Frameworks are used most

https://ift.tt/2qIGLiv

Submitted April 19, 2018 at 01:54PM by ExploreGroup

Setting cookie for localhost from remote node server

I have the client code running on my localhost and a nodejs server on heroku.I send a request to node server and set a cookie accordinglyWhen both server and client lies on the localhost, I can set cookies by using set-cookie-parser package.However, it seems like I cannot set the cookie when the node server runs on remote heroku. I am sure the AJAX call is caught by the server.Is there anything special I have to do in that case or the problem lies somewhere different?Client:axios.post("https://ift.tt/2Hb1rKq", {email, password}, {withCredentials: true}) Server:let registerOptions = { url: 'https://ift.tt/2Hb1rKq', method: 'POST', form: {} }; app.post("/register", (req, res) => { registerOptions.form = req.body; request(registerOptions, (error, response, body) => registerCallback(res, error, response, body)) }) const registerCallback = (res, error, response, body) => { if(response.statusCode === 200){ cookieData = setCookie.parse(response.caseless.dict['set-cookie'][0]); const {name, value, path, secure, httpOnly} = cookieData[0]; options = {path, secure, httpOnly}; res.cookie(name, value).send('CookieSet') } else{ res.status(response.statusCode).send(response.body); } }

Submitted April 19, 2018 at 10:44AM by eligloys

Twitter Bot Tutorial #1 - Install Node.Js

https://www.youtube.com/watch?v=9Q26B-9UBss

Submitted April 19, 2018 at 10:58AM by StereoPT

Debug Node.js Apps using VS Code

https://ift.tt/2rqxPjF

Submitted April 19, 2018 at 07:32AM by r-wabbit

Building nodejs server for production

I have a small node application which is only one server.js file and node_modules folder along with package.json.Am I supposed to include node_modules folder along with server.js when uploading to a remote server or is there a way to deploy it for production as in ReactJS with create-react-app ?

Submitted April 19, 2018 at 07:57AM by eligloys

Wednesday 18 April 2018

node project works differently for different developers.

So I have a web app project that was left by another developer I just started picking up on. The project uses node modules, one of which is bootstrap. So the project worked fine previously. but now when I run it the bootstrap does not work(or any of the modules). We have tested it with the previous developers account and it works just fine.Could there be a difference between what the other user has available and what I do outside of the project? And if so how can I find the differences?We are running in centos/RHEL7, the project was built in intellij and is being run with ng from the command line.

Submitted April 18, 2018 at 06:21PM by wobmonsta

debug wrapper that is able to resolve it's caller path and package.json information, so it needs no namespace configuration

https://ift.tt/2qK5hiH

Submitted April 19, 2018 at 12:03AM by rodrigogs

socket.io question.

I using socket.io to play a video in sync with multiple clients, I just simply emitting a 'play' or 'pause' event and toggle play the videos on the client side when the event is received.whats a good way to make sure all clients play/pause at the same time? it doesn't have to be instantaneous, as long as it's in sync.

Submitted April 18, 2018 at 06:37PM by free_radical_

`user`(variable) is not defined while rendering ejs file

the repo: https://ift.tt/2H9hxEg trying/practicing to create a simple blog site and in the procedure. I've created the passport js login with Net Ninja, and now I have also tried practicing it for the 2nd time. and then I am trying to render the profile.ejs if you look at the code in profile routes you will be able to see what I'm trying to do.Like if the user is logged in only then the profile.ejs will be rendered otherwise it would be redirected to the login page.But somehow there is some error popping up in the profile.ejs file where I've called in the user from the route in { user: req.user } but it doesn't seem to get any user. the error always comes up as user is not definedI'm really looking forward to this blogsite 'cause as you said after practicing I feel pretty confident that I would be able to complete this on my own. But somehow I'm again that stupid

Submitted April 18, 2018 at 06:55PM by tapu_buoy

Node on Windows Server?

I want to create a couple of internal/intranet Node applications on a server we have at work. The server has Windows Server installed on it.Some issues/questions that I have:Node is installed but NPM doesn't work (times out when installing packages -- might be because of the corporate proxy).I can't seem to get my HTTP application to work using server-name:port-number but it'll work when I remote into the server and use localhost:port-number.Do I need to configure IIS at all or should I not worry about using a reverse proxy since this is an internal setup?If I should use IIS... do I have to use iisnode? The reason I ask is because it looks like an abandoned project.I am using Sublime Text and was wondering what was the best way to edit files on the server... I currently have a shared drive on the server where I am storing the app files (so I can view/edit via the sidebar/explorer).

Submitted April 18, 2018 at 07:08PM by Mithril86

Is there a resource where I can learn how to structure my project and the different conventions?

I am trying to learn Node.js from Django. Django pretty much does everything for you, so I'm struggling with my project layout and deciding the which way to do certain things.I've been making projects for fun but I always get frustrated at how messy things can get and I feel like i'm not doing things the right way.

Submitted April 18, 2018 at 07:14PM by Vyvansethrowaway112

Generate node_modules in parent directory ?

I have two directory folders which I would like to have a common node_modules folder reference. Is this in anyway possible ? Is there a way to generate node_modules in a different directory other than default ?Thanks !

Submitted April 18, 2018 at 07:45PM by FurryFirefly

[x-post] Apache Module Manager - A CLI tool for enabling/disabling Apache modules

https://ift.tt/2vrKNkc

Submitted April 18, 2018 at 06:38PM by KodieG

Not sure of search terms...

So, being 100% honest I haven't been able to search much due to not really knowing how to search for this.Basically, I have a 'success' page that is rendered once a user is successfully created. This page is routed to '/register/success'.I don't want this page to be accessible unless it's rendered through the user creation process on '/register'.I realize that sessions could be an answer, however, I don't want the user to have to be logged in for this due to them probably not having a login since they're creating a new user, which itself should only be accessible when not logged in.Are sessions the way to go with this? If not, that kind of stuff can I search up to get this functionality?Thank you!

Submitted April 18, 2018 at 05:30PM by Jonny15T

Strapi v3@alpha.12 - GraphQL, Rich Text Editor & Redesigned Dashboard

https://ift.tt/2HJcUhp

Submitted April 18, 2018 at 04:48PM by pierreburgy

SSR vs CSR

im kinda confused about CSR can you guys maybe give me some examples of actual code i can look over?

Submitted April 18, 2018 at 02:20PM by SeanCarroll17

gRPC retry mechanism?

I am building a gRPC client in Node.js. I want my failing calls to be executed a few more times before giving up. I cannot find anything about this in the documentation, although there seems to be something similar but for the Go package. Do you have any idea how to achieve this? If not possible with the grpc package, what is a possible solution?

Submitted April 18, 2018 at 01:05PM by LC2712

Using async/await to write cleaner route handlers

https://ift.tt/2DRV2gV

Submitted April 18, 2018 at 12:31PM by fagnerbrack

What is parse server exactly ?

Hello,I have some troubles understanding what is parse server role in a webapp.So it's both used for the db, auth and file system (using s3) of the app right ?It's not very clear in the docs :https://ift.tt/2vrFP7a

Submitted April 18, 2018 at 09:41AM by OogieFrenchieBoogie

Developers coming from backend langs (C/C++/C#/Java) who chose Node for a project, why?

I've mostly seen that Node developers come from a frontend background, which makes sense considering the low barrier to entry, but I'd like to hear the perspective of someone who chose Node coming from a backend (I know, vague) background.Also, it doesn't count if you chose Node because you are managing a team of people who are familiar with Node, or something similar.

Submitted April 18, 2018 at 08:54AM by pknopf

Tuesday 17 April 2018

What You Can Expect From Node.js 10 - NodeSource

https://ift.tt/2HanfSz

Submitted April 17, 2018 at 11:53PM by _bit

How do I construct resource URLs on REST API server?

Suppose I have a REST service with controller methods like this (written using a helper for expressJS):@route('/api/v1/users/:id') getUser(id) { return json({ user: getUserFromDatabase(id), friendsUrl: '/api/v1/users/' + id + '/friends' }); } As you can see, the creation of friendsUrl link is hardcoded here.I'm pretty sure this is a bad idea, because my app is large, and I may decide to change my urls, my api version, or something else.What is the state-of-the-art way to construct REST resource URLs on the server? I suppose they should be tied to controller methods, but I'm not sure how to best do it in JS.Any advice is appreciated!

Submitted April 17, 2018 at 10:58PM by smthamazing

NPM, Yarn and Node vanish from my laptop?

I'm sitting on a Ubuntu 16.04 and this is the second time when I try to start my react native app and I cant.I check what versions of yarn, nmp, node are installed and it says its not installed.....This leaves me completely baffled as I was using it before and I have not uninstalled it.Does anyone know what is going on?

Submitted April 17, 2018 at 09:12PM by RockiRider

TypeScript + NodeJS Template

Hello guys I have released a new version of my project template. I have tried to use the best practises of NodeJS and TypeScript. Let me know what I can improve and if you are interested in a template generator.https://ift.tt/2qG0Qp8 List:Language - TypeScriptREST API Framework - koa2Graceful Shutdown & HealthCheck PatternSQL Database & Migrations - knexAuthentication and Authorization - JWT TokensValidation - JoiTesting - Mocha Chai + Sinon + NYC CoverageCode Style - PrettierGit Hooks - Husky

Submitted April 17, 2018 at 09:48PM by Talento90

A View into How Some Node.js Projects Address Security Challenges

https://ift.tt/2DtPMzQ

Submitted April 17, 2018 at 08:44PM by r-wabbit

Has anyone written a Tuition Assistance Request app before?

I am in charge of rewriting our very mediocre Tuition Assistance request application. I'm creating it in Node. Since this appears to be a somewhat difficult app to make, I was wondering if anyone had any insight on good design techniques for such an app. I know this is a little vague, but any insight at all would be appreciated. Thanks!

Submitted April 17, 2018 at 08:54PM by PTomCruiser1

NPM, Yarn and Node vanish from my laptop?

I'm sitting on a Ubuntu 16.04 and this is the second time when I try to start my react native app and I cant.I check what versions of yarn, nmp, node are installed and it says its not installed.....This leaves me completely baffled as I was using it before and I have not uninstalled it.Does anyone know what is going on?

Submitted April 17, 2018 at 09:12PM by RockiRider

A View into How Some Node.js Projects Address Security Challenges

https://ift.tt/2DtPMzQ

Submitted April 17, 2018 at 08:44PM by r-wabbit

Boilerplate for Node.js packages

https://ift.tt/2jFW71w

Submitted April 17, 2018 at 04:16PM by diegohaz

Swagger and RAML model APIs. Is there anything similar to model events?

My company needs to model a lot of events, similarly to how apis are modelled - that is to say, we'll need a standardised system for the "contracts" and a node toolset built around them (parsers, linters, UI...).Is there something on the market we can use either as an out-of-the-box solution or as a starting point?

Submitted April 17, 2018 at 04:22PM by kace91

NodeJS reload page but don't send user data again

Hopefully I'm posting correctly.I have a Node Js local server and several identical html pages. On every page I save some user data input fields saved simply on a text file. My problem is that if the users refresh the page the data from the previous html page is send again and again saved on the text file. Is there a way to prevent this?var fs = require('fs'); const log=require('simple-node-logger').createSimpleLogger(); var express = require('express'); var bodyParser = require('body-parser'); var app = express();app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); var port = process.env.PORT || 8000;app.use(express.static(dirname + '/server')); app.use(express.static(dirname + "/public")); app.use('/images', express.static(__dirname +'/images'));app.listen(port, function(){ console.log('server is running on ' + port); });app.get('/', function(req, res){ res.sendfile('intro.html'); });app.post('/userID', function(req, res){ //save the userID on a text file var userID= req.body.userID + ';'; var data = fs.appendFileSync('temporary/userID.txt', userID, 'utf8');return res.sendfile('main.html'); });app.post('/submit', function(req, res){res.sendfile('main2.html'); }); Furthermore, I have also a refresh button that does the same as the browser refresh button. I s there a way to avoid the same problem? and its JavaScript:document.addEventListener('DOMContentLoaded', function () { document.querySelector('button').addEventListener('click', clickHandler); });function clickHandler(element) { location.reload(); } Thank you in advance!

Submitted April 17, 2018 at 02:21PM by rulli123

Is there any way to install nodejs on a RaspberryPi 0 w?

Hello. I’ve got a Pi 0 W and tried to install discord.js but it tells me that node.js v6.0.0 is needed, and I only have 4.8.2. Is there any way to upgrade node.js (like version 6 or 8) for an armv6 system? If not, is there any way to install an older version of discord.js that will work on my pi?

Submitted April 17, 2018 at 12:56PM by GoDzM4TT3O

Issue with deploying MERN app to Heroku

Hi,I just deployed my MERN app on heroku. I followed all the instructions and successfully deployed it but heroku cannot see the files.on the browser i'm seeing Not Found. please see link below. https://ift.tt/2H57K2i knows how i can resolve this. the MERN application is working fine on my local machine. Please see my server.js file below. Thanksconst express = require('express'); const bodyParser = require("body-parser"); const mongoose = require('mongoose'); const Admin = require('./Admin.model'); const fileUpload = require('express-fileupload'); const multer = require('multer'); const path = require('path'); const uuidv4 = require('uuid/v4'); const app = express(); const dev = app.get('env') !== 'production'; if(!dev){ app.disable('x-powered-by'); app.use(express.static(path.resolve(__dirname, 'build'))); app.get('*',(req, res)=>{ res.sendFile(path.resolve(__dirname, 'build', 'index.html')) }) }; app.use('/uploads', express.static(__dirname + '/uploads')); app.use(bodyParser.urlencoded({ extended: true })); app.use(bodyParser.json()); app.use('/api', require('./routes/api')); const db = "mongodb://localhost:27017/the_peel"; mongoose.connect(db); mongoose.Promise = global.Promise; const port = process.env.PORT || 8000; app.listen(port, () => console.log(`Listening on port ${port}`));

Submitted April 17, 2018 at 12:15PM by myrrtle

React Ninjas Newsletter – Issue #2

https://ift.tt/2vkvVEt

Submitted April 17, 2018 at 10:33AM by SebastiaanEssen

Custom response with aync/await error handling wrapper inside route contollers?

Hello, I wanted to use async/await instead of simple callbacks in my ExpressJS route controllers, and I have error handling wrapper function that wraps async functions to prevent try/catch blocks all the time but I stumbled upon a problems with it.I cannot send custom responses from it? For example I want control what the controller will respond back, also there might be additional logic inside where I want to send custom error messages, like having conditions that can send back different responses, but using this async error wrapper I can only get the generic error (or the custom errors I set up in mongoose models, but I want to have more options in controllers anyway) or as a response I can only get thing which for example MongoDB gives back from "findOne" method.What if I want to find a record in DB and beside record I want to add more things to the response, I can't find a way to do it with async/await. I just await on result and pass it as res.send(result), no flexibility.I am sure there is a solution to this and would like to hear your opinions. :) Thanks!

Submitted April 17, 2018 at 10:36AM by nikola1970

How to mock Rabbot/amqb.node for integration testing

I'm trying to find a way to mock amqp responses in an application, to avoid having to create a running instance of RabbitMQ just to be able to run integration tests. The app uses Rabbot as an abstraction layer, which in turn uses amqplib (amqp.node) under the hood.I've done some Googling, and it only turned up one Github issue of someone else wanting to achieve the same thing in 2014 hereHas anyone managed to achieve what I'm trying to do, or have any suggestions of a better way to go about it?

Submitted April 17, 2018 at 10:17AM by jbutlr

Monday 16 April 2018

Excellent course. Highly recommended for beginners in NodeJS, the course passes through a lot of subjects in software development like deploying, persistence in a database, security, and unity test. Andrew is a great teacher.

https://ift.tt/2GxfQfq

Submitted April 17, 2018 at 12:12AM by anchorgel

The Node.js Ecosystem Is Chaotic and Insecure

https://ift.tt/2qATa8k

Submitted April 16, 2018 at 11:22PM by blockdeveloper

Passport.js - using Google for authentication: do I have to use the refresh/access token?

My goal is to have a website where people can login using their Google account. I only extract some basic info such as their Google id, name and e-mail and save it in in a database. My plan is to re-use the record saved on my database whenever they sign in again with their Google account.At this moment, I have setup some code using Passport.js where users can login using their Google account and a callback method gets executed which contains the refresh token and access token and their profile data.If I understand correctly, I will only need the access token and refresh token if I actually call some other Google API. Is this correct?Since I don't want to do that, my plan is to save the access token in a database and save it as well on the client's side to be able to see whether they are authenticated.

Submitted April 16, 2018 at 09:55PM by ViceCity6

Hey there! I wrote a post about making a proxy in NodeJS. Hope that it helps with the topic!

https://ift.tt/2ESGZIi

Submitted April 16, 2018 at 09:29PM by Gonzaesc

Someone is serving my site from their domain

Does anyone know what the cause of this might be? Their site is updating live alongside mine. Is this sort of thing dangerous? I use steam for login, which redirects back to my original domain so I don't think it's a phishing attempt, but how is this possible?

Submitted April 16, 2018 at 06:42PM by Almatrass

Build and deploy a social network with Node.js, Express, React, Redux & MongoDB. Learn how to put it all together.

https://ift.tt/2veIBwm

Submitted April 16, 2018 at 03:52PM by moleday

env-manager-cli: update all the envs from the command line!

https://ift.tt/2vlt3al

Submitted April 16, 2018 at 03:08PM by bvbrandon

Video explaining promises for beginners

https://youtu.be/WBupia9oidU?t=36s

Submitted April 16, 2018 at 01:42PM by krsnvijay

Simply game server w/ Express & websockets

Simply soccer game server w/ boids in express & websockets. w/ client interface.Demo https://ift.tt/2HFhpK0 Code https://ift.tt/2IYVugc

Submitted April 16, 2018 at 01:38PM by kaolay

Use a HACKDAY to PWA a React app – Medium

https://ift.tt/2HDtTS7

Submitted April 16, 2018 at 01:13PM by craigtaub

[Suggestions] Create and manage Google Form through NodeJS app

My use-case is the following: Desktop app using Electron and React; The user may create a Google Form through the app, possibly through my own crafted interface, or displaying the webview inside the app, with limited controls (I would like to avoid having to open a web page if possible). Said form is then sent by email to contacts, and the app periodically checks for new submissions to display them in the dashboard.However Google Form is rather convoluted on this point. For starters there doesn't seem to be an API for this unless you go through AppScript, and as of now I'm very unclear about what I can and cannot do with it.What I'm looking for mostly is pointers; The online form doesn't necessarily need to be Google's, as I'm rather put off by the lack of a proper JS API. It does need to come without limitations however, as this is meant as a free app.Any and all suggestions are welcome. Thank you.

Submitted April 16, 2018 at 12:41PM by Unforgiven-wanda

Crate - A sample web and mobile application built with Node, Express, React, React Native, Redux and GraphQL.

https://ift.tt/2qyA5DU

Submitted April 16, 2018 at 12:13PM by atulmy

Node.js Development Company India

https://ift.tt/2qzDVMb

Submitted April 16, 2018 at 10:50AM by MetaDesignSolution

How would you determine quality of simmilar frameworks

For example REST API frameworks, if we ignore additional functionalities between frameworks, how would you determine which one is better (for example restify and loopback)?My metrics currently are:- Documentation (filters, updated, correctness, look)- Performance (nr. of calls / time, CPU/RAM usage, latency...)- Size of community- Lines of code needed in same project- Deploy time- ...

Submitted April 16, 2018 at 07:13AM by nejcn001

Sunday 15 April 2018

Problems while validating payload with Joi and Hapi.js

Hello! I've been using Hapi.js to develop a RESTful API, but it seems the validation isn't working or I'm doing something wrong... I'm a quite noob with Hapi.js./routes/cards.jsconst CardController = require("../app/controllers/CardController") const Joi = require("joi") module.exports = [ { method: "GET", path: "/cards", handler: CardController.getAll }, { method: "POST", path: "/cards", handler: CardController.create, options: { validate: { payload: { number: Joi.number() .equal(12) .required(), fullName: Joi.string() .min(1) .max(255) .required(), cvv: Joi.number() .equal(3) .required(), expirationDate: Joi.string().require(), company: Joi.string() .min(1) .max(255) .required() } } } }, { method: "DELETE", path: "/cards/{cardId}", handler: CardController.remove }, { method: "PATCH", path: "/cards", handler: CardController.update } ] Postman Screenshothttps://imgur.com/a/wsVbC

Submitted April 16, 2018 at 12:46AM by giocruz

Why Typescript?

I’m a junior backend developer working on Node backends and I keep reading about Typescript and typesafe notation. Could somebody explain me what benefits exist by using Typescript? Thanks in advance

Submitted April 15, 2018 at 11:49PM by neurod1sk

Rollup keeps making an empty bundle/

I'm using ` rollup-plugin-multi-entry`This is my rollup configimport multiEntry from "rollup-plugin-multi-entry"; export default { input: "library/select.js", plugins: [multiEntry()], output: { file:'script.js', format:"umd" } }; But all I get when running 'rollup -c' islibrary/select.js → script.js... (!) Generated an empty bundle created script.js in 18ms

Submitted April 15, 2018 at 10:43PM by OzziePeck

Some questions about node js deploying

Hello! Please give me some suggestions and comment down some node js deploying services I want cheap and good services. Also how I can deploy node js app if I rent VPS Server. I am waiting for your suggestions and some guides <3

Submitted April 15, 2018 at 09:43PM by EL10T00

Data mapper ORM for Node

I'm looking for an ORM that will keep my domain clean without injecting DB related code into my entities (user.save() => active record), rather something that is more like the data-mapper/repository pattern where my domain is kept clean (POJO) & I define the mapping between entities and table so it provides a set of helper method (userRepository.save(aUser)). Knex is similar to this but a bit too minimal. Any ideas?

Submitted April 15, 2018 at 07:39PM by yonatannn

Avoid defining so many JSON models (swagger, joi, mongoose...)

Typical app with API, entities and ORM would have to define the models in 3 different and equivalent places: swagger for API, json-schema/Joi for entities, some ORM-specific format (e.g. moongoose or sequelize models). Adding a new field? add 3 times... doesn't make senseIs someone familiar with a technique to define models schema once, hopefully with json-schema, and generate API docs based on that?

Submitted April 15, 2018 at 07:44PM by yonatannn

How to Avoid Requiring the Same Module Multiple Times?

I have several .js files I export and require as modules, in order to separate functionality. For example, I have two files that use web requests:- checkForUpdates.js- getRemoteData.jsSince both files need web requests, they both use:const request = require('request-promise'); However, since const can only be modified once, this creates an error. I could change const to var, and I assume the first require will be cached and used, but I am not sure this is the case or if this is the appropriate way to use require for multiple modules that require the same module. On the other hand, I could require this library before requiring both modules, but then these modules are not able to be used easily in another project and loses context of scope.How should this be handled?Additionally, if there are detailed codebase management guides, please point me to them!

Submitted April 15, 2018 at 04:45PM by _Kai

Part of open source organizations

I want to be a part of open source organizations on github to contibute to open source community mostly on backend technologies. I want to build projects with teams from scratch. Any suggestions on how to join and which organizations I can join?

Submitted April 15, 2018 at 11:56AM by pragmaticpi

Node.js can HTTP/2 push! – Node.js Collection

https://ift.tt/2v6fCuy

Submitted April 15, 2018 at 08:54AM by ms-maria-ma

Saturday 14 April 2018

How to go about debugging/adding a feature to existing CLI Node app?

I'm trying to get better with node js by working on an existing project from GitHub and hopefully contributing to some of the issues. The project runs in terminal and I am not sure how to go about figuring out how it works. I've worked on node web apps but never a CLI tool. Any advice would be greatly appreciated. For reference, this is the project: https://ift.tt/2zgwFLl

Submitted April 15, 2018 at 02:47AM by qwe456yui

Run node synchronously

This may be a very stupid and backwards question, but is there a way to make node explicitly synchronous, as in like plain web based JS? In the project that i'm working on, i'm using node specifically for the CLI and no other reason. My program has very little async operations, but it's comprised primarily of functions spread out over a few files, that are designed to run one after another, and trying to deal with all the unnecessary callbacks and promises has been an absolute nightmare.

Submitted April 15, 2018 at 02:20AM by captainXcannabis

Should I use the package manager version (Ubuntu 18.04 LTS) or github.com/nodesource/distributions?

No text found

Submitted April 14, 2018 at 11:31PM by MachineUnlearning

Cannot PUT /Blogpost/ Model (Edit function) not working

i am currently trying to fix a PUT command after installing method override but something is stopping the PUT from workingexample of error "cannot PUT /Blogpost/kjd4e83n3"here are the postbins if anyone can help as i need this finished by monday!Thankshttps://pastebin.com/K63J1fhw - app.jshttps://pastebin.com/xg9BwPi5 - edit.handlebarshttps://pastebin.com/8fkVWn0z - blogoutput.handlebars includes edit code!Thanks! trying just to fix this before attempting login and register

Submitted April 14, 2018 at 05:50PM by thunderknox

Is a Node.js Uptime Monitor so simple to make or am I missing something?

https://ift.tt/2GY5iuh

Submitted April 14, 2018 at 03:22PM by deadcoder0904

Using async iteration natively in Node.js

https://ift.tt/2GG36GV

Submitted April 14, 2018 at 08:54AM by ginger-julia

Friday 13 April 2018

Isomorphic & async object-validation library

https://ift.tt/2v802P8

Submitted April 13, 2018 at 09:22PM by kapv89

NSFAI is a simple way of implementing NSFW detection into your project.

https://ift.tt/2quvNxj

Submitted April 13, 2018 at 07:19PM by skiilaa

Could you please participate in my survey?

I am a student currently doing a research on "The Impact on Software Maintainability from the use of Agile Software Development Methodologies". I hope to get your response on my survey for this research.Please find the survey link as below: https://ift.tt/2I7Rido

Submitted April 13, 2018 at 03:59PM by quickshot_cyk

Mind your dependencies

https://ift.tt/2G5H7tx

Submitted April 13, 2018 at 02:13PM by fagnerbrack

[Question] Express Handlebars and Logical Operators (transfer from ejs)

So I have problem to transfer in my "express handlebars" template
EDIT
line from "ejs" template<% if(currentUser && campground.author.id.equals(currentUser._id) { %>
EDIT
<%}%>Yes, I know that I need to use helpers, but I can't figure how and I think I will learn a lot if I see transfer between templates in action on this particulary problem.

Submitted April 13, 2018 at 10:15AM by ExplicitGG

Is there a way to compile a node project into a command line executable?

Hello,I'm not talking about Electron but about an executable for the command line.

Submitted April 13, 2018 at 07:26AM by hthouzard

Thursday 12 April 2018

Node Project File Size with create-react-app. 185MB for 'Hello World'?

I'm new to node. I rannpm install -g create-react-appand it installed less than 100 files. Great. I thought I was all set.I tried to create a new project offline withreate-react-app my-appand it threw errors because I wasn't connected to the Internet.I connected to the Internet and ran it again. Into the directory for the project (not some default directory for all node projects), it put over 22,000 files and totaled 185MB.Did I do something horribly wrong? Must I install 185MB for each new react app? Can I not start a new project with create-react-app without being connected to the Internet? Help.

Submitted April 12, 2018 at 09:17PM by CodeCamping

How should I validate JSON in Koa?

I am making an API which will take JSON as an input via PUT/POST and I want to ensure a few things like certain fields need to exist, certain fields need to be numbers, certain fields can be optional etc.I found a koa-validator but it's not had any change in 2 years on github and seems not to be popular enough for me to trust enough in my production level koa API.How would you guys approach this? I could do it all vanilla but I feel like this is an issue a lot of devs have probably run into and therefore there's probably a better way.Thanks

Submitted April 12, 2018 at 03:40PM by Crypto_bismol

Observables in Node.js (Express mostly) context

I get why Observables (rxjs) are popular, I can see their pros. But while I can see the use case on front-end what would be the typical use cases for REST API written in Express? I guess I'm a little confused as to their place.Any examples where they would fit nicely and be a legit upgrade (either performance, maintenance or developer experience)?

Submitted April 12, 2018 at 02:17PM by galkowskit

Locating Memory Leaks using StackImpact Node.js Profiler (uses V8's heap allocation sampler)

https://ift.tt/2IJOUKj

Submitted April 12, 2018 at 01:22PM by l0g1cs

HTTP/1.1 400 when piping with netcat

I am trying to create a stream parser, but I have encountered a problem. My setup: generator.js - outputs a random string in stdout every second sender.js - accepts a stream on port 9998 and sends it using http to listener.js on port 9999 listener.js - accepts a stream via http on port 9999 and outputs it to stdout Using only core modules - net, fs, http.The problem: When I pipe node generator.js | nc localhost I get HTTP/1.1 400 Bad Request.What might the problem be?

Submitted April 12, 2018 at 07:58AM by bilporti

Async / Await in Node.js

https://ift.tt/2GVLTpX

Submitted April 12, 2018 at 08:40AM by tpiros

Where to find best NodeJS Hosting for Your App?

https://ift.tt/2qpQlHc

Submitted April 12, 2018 at 07:51AM by dhananjaygoel1

Wednesday 11 April 2018

Creating a REST API: Handling POST, PUT and DELETE requests

https://ift.tt/2qlJ0HI

Submitted April 11, 2018 at 07:22PM by dmcghan

Performance Comparison: SHA-512 is 12-27% faster than SHA-256

https://ift.tt/2GRc1WS

Submitted April 11, 2018 at 10:28PM by moshestv

Introducing hapi pal: a suite of tools and best practices for the working hapijs developer

https://ift.tt/2GRc8xn

Submitted April 11, 2018 at 08:05PM by devinivy

High-octane routes store/retriever

https://ift.tt/2GTa5ZZ

Submitted April 11, 2018 at 05:04PM by yosbelms

Working offline with Yarn

https://ift.tt/2EEee1M

Submitted April 11, 2018 at 06:59PM by assafmo

What are your experiences of using reactioncommerce?

I'm going to start doing an ecommerce for a small local company and I want to do it with node.js + react, not because I hate php... I've 2y of experience with php and 1 with node, but I want to try something new. Is it viable to use it? Maybe some people think isn't a mature tech but they were building it for like 4 years.https://ift.tt/1vsVz0E

Submitted April 11, 2018 at 05:51PM by GeeGeeks

Simplify your functions adding “hooks” to your Promises

https://ift.tt/2H5OMFd

Submitted April 11, 2018 at 06:08PM by sebelga

noob needs help, pls

Hi, I'm new to node.js, and I would really like to understand how it works, because I have no fucking idea where to start. There are so many concepts, and I just feel like what I'm doing amounts to nothing. I tried nodeschool, and I just lost it in the third activity, because I don't understand the terminologies. Can you just help me find the way. I sound desperate right now, I know. It's just really frustrating.

Submitted April 11, 2018 at 03:19PM by itscoughsyrup

Built a K8s tool on the 9.10-alpine image. Watchpod: a single instance K8s cluster tool for file watching and deployment automation.

https://ift.tt/2GNJCkw

Submitted April 11, 2018 at 03:57PM by A-SimpleHuman

Are there any Telegram group chats for the NodeJS community?

No text found

Submitted April 11, 2018 at 03:39PM by festive_bardeen

Open source Node Projects

I am a begineer in nodejs. I have learned all the basic to intermediate concepts and developed some small projects. I want to contribute to open source projects. But I want to contribute into some project which are at starting level as I want to start from scratch. Any suggestions will be helpful. Thanks

Submitted April 11, 2018 at 03:50PM by pragmaticpi

Best coin payment api for node.

I have a small website that currently accepts paypal to pay for stuff. I would like to add payment by crypto currencies. I found a few possible candidates but not much 3rd hand information about them. So far I have read aboutcoinpaymentsbitpaybitgocoingateand a couple others. Have you had experience with any of those and can recommend which one to use or to avoid? I would prefer a simple rest api similar to paypal, where the user is redirected to the services site to execute the payment and then directed back and I would prefer to transfer the payment directly to my wallet(s).

Submitted April 11, 2018 at 01:21PM by -jFk-

Just made a new online JSON editor which make sense (more features coming soon pm me for requests)

https://jsonviewer.io

Submitted April 11, 2018 at 01:31PM by freemasonir

How to develop, deploy and debug Angular and NodeJS applications on Kubernetes. Experimenting with Visual Studio Code and remote debugging

https://ift.tt/2IIPU14

Submitted April 11, 2018 at 12:25PM by radu-matei

Consumer-Driven Contract Testing with Node.js & Pact

https://ift.tt/2GQb4Kk

Submitted April 11, 2018 at 11:43AM by andreapapp

(noob question)I am learning about child processes in node. I am wondering why CPU intensive tasks are not recommended for node. Can't I always spawn a new child process if I need to perfom CPU heavy operation?

No text found

Submitted April 11, 2018 at 10:38AM by sangupta637

Build an Emergency Notification Slack Bot in 10 Minutes with MessageBird, StdLib, and Node.js

https://ift.tt/2HqhC3x

Submitted April 11, 2018 at 08:56AM by JanethL

What are your experiences with the sequelize ORM?

No text found

Submitted April 11, 2018 at 07:58AM by not-much

Tuesday 10 April 2018

Why using `_.chain` is a mistake.

https://ift.tt/1osrYW5

Submitted April 10, 2018 at 11:19PM by unquietwiki

Any Good Examples of Sequelize Data Model with unlimited Tree Structure foUser Relationships?

TL;DR – Trying to create tree structure user relationships with single parent, unlimited children, unlimited levels of depth in which we can pull organizational stats from any user node and their children in scalable way.My challenge is to create a user table(s) with a tree relationship structure. Here’s my outcome, which at first glance seems straightforward.Each user node can have only one parent, as a user must be invited by an existing user.Each user node can have multiple children user nodes. We could limit it to be practical, to zero to 500 children per user.There are no limitations to the depth of relationships. Theoretically, a user could add a user, which adds a user, and this could repeat a few hundred times.This would all be fine, except the primary purpose is for reporting on productivity stats organizationally, so a traditional parent/child relationship would result in exponentially long reads for aggregate data for any given branch.Let’s say we have an Action table like the following:(pk) actionId (Int)(fk) userId (User)createdAt (DateTime)actionType (Enum)minutesActive (Int)We would want to be able to show the user a dashboard showing:Bar graph showing total # of minutes worked each day for a specified action type, mapped over the last week.Same stat showing weekly totals mapped over the quarter.Again, that’s no problem for that specific user, but we also want each user to be able to see aggregated stats for each child branch. Let’s say the first user they added has then added users themselves and so on to where that first branch includes 250 users. Then their second branch includes 150, the third 100, and so on for 20 different branches, and we want their dashboard to be able to show Action statistics mapped over time per branch.At the same time, any other user of the system could be pulling up a dashboard of their branches.This would implode on itself pretty quickly when a single query requires a few thousand read operations.I’ve been trying to study up on the best way to structure user relationships for such a use case, and I’m not finding great examples. It’s challenging when there aren’t clearly defined tiers/levels.I have a few crazy ideas on approaches, but I thought it might save a ton of headache leaning on someone much more experienced.If it matters, my backend stack is node.js/express.js for server/business logic, sequelize.js/postgresql for ORM/DB, Apollo-server / graphql for API, and then my frontend go-to is react.js, using Apollo-Client for async – so all javascript based. I’ve got more experience with Django/Python/Graphene backend, but since I’m so buried in Javascript for frontend anyway, I figured now’s a good time to start doing everything in one language.So, if you’ve read this far, I’m SUPER grateful. I wasn’t sure the best way to communicate my challenge. If you’ve got a learning resource you’d recommend, I’m happy to dig deep on it and do my homework. If you have a solution in mind you could explain, I would love that as well. If it’s asinine to endeavor to achieve this without google/facebook-level resources, I get that too.Any insight would be much appreciated!

Submitted April 10, 2018 at 07:34PM by gtderEvan

An Intuitive Node.js Client for the Kubernetes API

https://ift.tt/2v2glgo

Submitted April 10, 2018 at 05:23PM by gorgerson

New dev tool for node.js and mongodb apps that monitors and visualizes asynchronous processes and packages !

https://ift.tt/2HqEzDM

Submitted April 10, 2018 at 05:34PM by pjr4lph

Is Node/Express Good Solution for Responsive E-Commerce Portal Using RestfulAPI (Backend)

Hi All,We are planning to develop our E-Commerce Portal utilizing RESTful Web Services API (as Backend) and looking for the following functionality.Develop a Responsive (for Mobile, iPad and Computer) E-Commerce Portal for customers to create/view their Quotes, Orders, Invoices, Inventory etc. and also view/email the PDF documents. We are planning to host the PDF documents on the web server due to size of the documents and therefore need some kind of Server Technology to binary stream the PDF documents on the fly from web server to user’s browser.Develop Handheld Specific Applications to be running on the Windows Mobile (Motorola Hand Held)At this time we are evaluating the following technologies, for our web front-end development:Node.js / Express Web Server (all business logic resides in RESTful Web Services already developed using Java)PHP Framework & (Apache or Nginx) Web ServerJSP & (Tomcat or Jetty) ServerAs all backend business logic will resides in RESTful API's already developed therefore we don’t want any heavy lifting server technology to use.If anyone can share their experience developing E-Commerce / Mobile App using any of the technologies above will really be helpful. Our first preference is Node/Express but just want to make sure it's capable to handle our above requirements.

Submitted April 10, 2018 at 03:01PM by usa13524

Is it worth it to use Swagger for our backend?

The company I work for is rewriting our code base from a Django based backend to a node express based backend. Currently we have a Swagger spec written up detailing all of the routes, originally only used for documentation purposes. However, I saw that you can use Swagger for the node backend, for example swagger-node. I was wondering is it worth it? Is it secure? The pros is that we could get a lot more work done faster, thus cheaper, but I am wanting to know if there is any major cons to going this route?

Submitted April 10, 2018 at 03:29PM by Mdos1059

Wonderful course by Andrew. Learned a lot about Nodejs, express & API from scratch. Special thanks for the in between short tasks, that never get bored watching any video.

https://ift.tt/2GxfQfq

Submitted April 10, 2018 at 03:53PM by anchorgel

NPM aquired the Node Security Project

https://twitter.com/npmjs/status/983706379620962305

Submitted April 10, 2018 at 04:00PM by ecares

Catch body parser error “request too large” error and return custom error?

Am using body parsing JSON express middle ware. But my app has custom error generation/format layer which inject some “business logic friendly” metadata. How I can catch these and wrap?

Submitted April 10, 2018 at 01:51PM by MyyHealthyRewards

Implementing SOLID and the onion architecture in Node.js with TypeScript and InversifyJS

https://ift.tt/2HnxF1N

Submitted April 10, 2018 at 02:10PM by ower89

Monday 9 April 2018

Get Google Search Results in Node.js

https://ift.tt/2qihBY9

Submitted April 09, 2018 at 10:43PM by hartator

Intermediate Node

Hello guys! So recently i was learning nodejs, but i feel stuck, i mean i dont really know what to learn right now. I can create fully featured blog app with REST, multiple authentication, etc. and I can do it in 4-5 hours, but right now I dont know where to go, should I learn new framework? or go for frontend?..

Submitted April 09, 2018 at 09:15PM by warchild4l

How can I create a local web server in Electron and serve internal files from that server?

I have index.html in my Electron app. I want to start a web server on http://localhost:8587 and open http://localhost:8587/index.html inside the Electron app. I'm not sure how to go about doing this. I think I have to use require('http'); somehow but I looked it up on the Node website but it's a bit overwhelming for me.

Submitted April 09, 2018 at 09:32PM by sprite-1

Useful vscode Node-related extensions

Would love to hear about your must-have vs extensions for Node development. Plz include a short descriptionSome suggestions from my part:jsrefactor - provides an extensive list of automated actions including the commonly needed: Extract Method, Extract Variable, Inline Variable - https://ift.tt/2qhEKd7 import - Automatically finds, parses and provides code actions and code completion for all available imports - https://ift.tt/2ExgvvK snippets - Snippets for Chai - https://ift.tt/2qhab7b metrics - Computes complexity in TypeScript / JavaScript files - https://ift.tt/2mlF0qc

Submitted April 09, 2018 at 08:52PM by yonatannn

Best template engine?

I haven't worked much with node.js so I know basically nothing in this regard. I'd like to use some php-like template, I meanhtml goes here html goes here So I'd like to ask experienced users if they use templates and if the could recommend me one of the template engines. So far I have only discovered EJS as I have not searched a lot.

Submitted April 09, 2018 at 06:23PM by eragonas5

Quickly generate REST APIs with ExpressJS and Swagger - features automatic request validation, interactive api doc, and more...

https://ift.tt/2t1IlMc

Submitted April 09, 2018 at 05:02PM by coracarm

Security PSA: Check your code for vulnerable regexes

I recently created this repo that combines the various regular expression denial of service detectors: https://ift.tt/2qjwvfN also created some npm modules for CI friendliness. - https://ift.tt/2GIVHas - https://ift.tt/2qk9nO9 these send your regexes to my server, but the code to host your own server is in the repo).Using these tools I found DOS vulnerabilities in Python core, Node.js core, Django, MongoDB, Hapi, and hundreds of npm modules.

Submitted April 09, 2018 at 05:36PM by davisjam

Check if a package exists from the terminal with `is-there-a`

https://ift.tt/2qltYl4

Submitted April 09, 2018 at 05:05PM by konaraddio

Read and map ENV variable into a JS object

https://ift.tt/2H2nj9P

Submitted April 09, 2018 at 05:07PM by akpakshendra

I'm trying to create a blog with Node.js but hitting errors

Node.js Top 10 Articles for the Past Month (v.Apr 2018)

https://ift.tt/2JwnZ5L

Submitted April 09, 2018 at 03:14PM by kumeralex

A composable SQL query builder using template literals ✨

https://ift.tt/2IFqCRs

Submitted April 09, 2018 at 03:06PM by galstarx

How to $pull ObjectId's from multiple collections simultaneously?

I have a mongo db of hundreds of different Users. Some fields contain the ObjectId of different users in Array form.When I delete a user I need to search every collection and delete any references to the deleted user by $pull ing their ObjectId from all relevant fields.Any thoughts on the sort of query I would need to run? Thanks a lot!

Submitted April 09, 2018 at 12:26PM by laura808s

NodeJS Routes only work on localhost else theyre 404

Project setup checklist (10+ bullets)

So you start a new project and tasked to prepare the solution for your entire team. What will be the steps/tools you run?(I'll add here my own checklist which currently includes 10 items)

Submitted April 09, 2018 at 12:49PM by yonatannn

Build advanced blog using node.js

https://ift.tt/2qhSmEl

Submitted April 09, 2018 at 12:21PM by EdwardSchmitt21

How to set up something like Nginx?

About to deploy an webapp. Expecting a about 10k first day traffic. Currently using Heroku and serving the files like so:app.use(express.static(path.join(__dirname, "public"))); A lot of talk that I should be using some sort of reverse proxy. I've looked into this before but always found it to complicated to sort out. But from what I've read it would help out a lot. Is that true?How simple is Nginx set up? Can anyone point me in the right direction, cause it looks tricky. Obviously I need to link the domain name also. Thanks :)

Submitted April 09, 2018 at 10:50AM by harrydry

API creation workflow: code or swagger first?

How do you manage your API documentation/collaboration workflow: code first with annotations then swagger from it OR design first using some UI hub and generate code from it? do you upload the swagger to some online hub (e.g. swagger-hub, apiari) for collaboration? which specific NPM package do you use?

Submitted April 09, 2018 at 08:58AM by yonatannn

Horrible performance when upgrading from node v6.7.0 to v8.11.1

Hello all, I have been spending the past few days investigating poor performance for an websocket graphql api application when upgrading node from v6.x to v8.x.I have taken lots of flame graphs but I cannot figure out where the bottleneck is. Does anyone know what ___kdebug_trace_string is? It appears to be taking significantly more time in my application after upgrading.Check out this flame graph: https://ift.tt/2IzVenF check out these profile logs:node v8.x profile log (slow): https://ift.tt/2JxpJvF v6.x profile log: https://ift.tt/2EvgKaL

Submitted April 09, 2018 at 07:19AM by tjmehta

Sunday 8 April 2018

One of the best Scaling NodeJS talk I have come across recently. Its a wealth of information on scaling.

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

Submitted April 08, 2018 at 09:34PM by hookawitweed

Does express package use different font than http while sending out text?

I have two pieces of server implemented below, one using http[commented] and other using express. Running them both I realised that the text gets rendered differently in chrome. Is there a particular reason for it?//var http = require('http'); //http.createServer(function(req,res){ // res.writeHead(200,{ // 'Content-Type' : 'text/plain' // }); // res.end('Hello World\n'); //}).listen(3000, '127.0.0.1'); //console.log('Server running at http://127.0.0.1:3000/'); var express = require('express'); var app = express(); app.get('/', function(req,res){ res.send('Hello world!'); }); var server = app.listen(3000, function(){ console.log('Server runnig at http:127.0.0.1:3000/'); });

Submitted April 08, 2018 at 07:47PM by ML-newb

Having serious issues with Promises/Async functions

Hi node,I've spent the past 4 days stuck on trying to get some Promises/Async code to work, but I just cant get it working, and I'm getting really desperate.I believe I've narrowed down the issue to :variable = await function(params) inside of an async function, but maybe my functions aren't promise-ified? I'm really not sure.Can anyone help me fix this please? I don't know if this kind of post is allowed but I am getting really really stuck and confused trying to work it out.code is here If anyone can help me get it working I'll owe them big time,Thanks, A man who is very confused.

Submitted April 08, 2018 at 06:54PM by neeyol

Logging with Express and pm2

Hello,i have built an express application and use the logging frameworks morgan and winston. In production should the application run with pm2 and behind a reverse proxy.I have got a few unanswered questions and hope you can answer them.Is pm2 a good Process Manager for applications in an production environment?How should I use logging? I know that pm2 writes stderr and stdtout in files. Now morgan and winston create their own files, so I got multiple file locations. The files from morgan and winston and in another directory pm2 logs.Can I redirect logging of morgan and winston to pm2? Because of logrotation and i don't want to have multiple file locations for an application.Are there best practices for logging in an express application with morgan, winston and pm2 in an production environment?I hope you can answer my questions.Thanks for your help and have a nice day.

Submitted April 08, 2018 at 05:52PM by xQuai

Node stops error reporting when the client uses a proxy

In my setup the server runs at port 3000, but the client accesses it with a proxy with a port 3001Ever since i set it up and if there is some kind of error (undefined variable, missing syntax or whatever other kind of mistake) instead of seeing that error in the console i see:Proxy error: Could not proxy requestIt doesn't matter what the error on the server is, this is the only message i get.Any idea how i can get the normal error reporting back?Here are links to the config i'm using: client - https://ift.tt/2JtmRQz server - https://ift.tt/2Ex14E0

Submitted April 08, 2018 at 07:48AM by fatgirlstakingdumps

Saturday 7 April 2018

Best game server with nodeJS?

Hi everyone!I just wanna know about some recomendations of a game server build with nodeJSSome requirements: good handling of websockets, lag compensation and game rooms!Thanks for your time reading this :)

Submitted April 08, 2018 at 01:23AM by quevedin7

Express.js and ES6?

When I for instance use the expressjs cli generator, I see for example that the imports are all using the varkeyword instead of e.g. let or const. Can I safely change these to const and write all my other (own) code using ES6?

Submitted April 07, 2018 at 11:30PM by ViceCity6

Throw error trying to put discord bot online...

https://ift.tt/2uWOsq9

Submitted April 07, 2018 at 07:08PM by GingyMN

What are popular JS web backend frameworks that companies nowadays use?

What are popular JS backend frameworks that companies nowadays use?PS: If i search for Node.JS job posts what does it mean since Node.JS isn't a web framework? Do i need to search for job posts with something like Express.JS etc.?Not searching for a job. Just doing research. Still studying.

Submitted April 07, 2018 at 06:36PM by halotacon80

Help. I get node error

https://ift.tt/2Hh87TX

Submitted April 07, 2018 at 07:04PM by GingyMN

Best Node.js web server frameworks in 2018?

The dillema: I'm trying to compare multiple Node.js frameworks and to pick the best one.What means best one? Fastest development, clear maintability, best perfomance, clear documentation.Rules: REST api or MVC for web server. Ignore fullstack frameworks. Version 1 or above.For now i tried (ordered from most to least): - Browsing "Best Node.js web server frameworks in 2018" with nr. of mentioned results: express, koa, sails, hapi, totaljs, actionhero, loopback, adonis , restify. - Nr. of downloads on npm last week: express, hapi, koa, restify, loopback, sails, totaljs, adonis, actionhero.Summary: - totaljs, adonis and actionhero have all under 5000 downloads per week. (others have above 20.000) - Sails and Loopback is built from Express...so perfomance will be in anycase same or slower than with Express. - Koa is (sorta) modular version of Express.

Submitted April 07, 2018 at 06:07PM by nejcn001

Create an Awesome websites and web applications

https://ift.tt/2uTth8q

Submitted April 07, 2018 at 01:58PM by EdwardSchmitt21

Made a video about how to install and use eslint

https://youtu.be/iMrk0tjGK-A

Submitted April 07, 2018 at 10:25AM by richie_south

Learn Node JS form Scratch - Free Udemy Courses - DiscUdemy

https://ift.tt/2qg145Q

Submitted April 07, 2018 at 08:35AM by udemyfreebies

Friday 6 April 2018

HapiJS + Boom newbie problem

I am having a difficult time returning error response using HapiJs + BoomThis is the particular part of the code I am having trouble withexports.deleteIssue = (req, h) => { var issue = Issue.findByIdAndRemove(req.params.id, function (err,issue){ if(err) throw Boom.notFound('Issue Not Found'); fs.remove(__basedir + "/uploads/" +issue._id, err => { if (err) throw err }); console.log(_.size(issue.documents)) var documents = issue.documents; deleteAllIssueDocuments(documents) }) .populate("documents") function deleteAllIssueDocuments(documents) { _.each(documents, (document) => { var documentId = document._id; Document.findByIdAndRemove(documentId, (err, document)=>{ if(!err) console.log("Deleted Document") }) }) } return "Deleted" } So instead of nice response in the body of the request I get the error on the server.https://ift.tt/2uSqUlZ am a total beginner in Hapi and just a bit more experienced in NodeJS in general, sorry in advance for my lack of knowledge. It would be great if someone could help me here :)

Submitted April 07, 2018 at 12:52AM by AndroidDvlpr

What’s the best route for an absolute beginner?

I have no coding experience. But am willing to put in time and effort if someone can guide me in the right direction. Please and thank you

Submitted April 07, 2018 at 01:03AM by GingyMN

how are modules made?

for example lets take the fs modulehow would i create my own personalized fs module for example how would i make my own fs.readFile() function? would i have to use another lang like C or C++ to do this

Submitted April 07, 2018 at 12:12AM by SeanCarroll17

How do I go about testing node mailer using mocha without actually sending an email?

I currently have an endpoint which accepts data and then sends an email with node mailer. I currently have an integration test that on the endpoint, but it sends an actual email every time I run my test suite. How can I avoid sending an actual email on every test, yet make sure that the endpoint is working correctly?Thanks!

Submitted April 06, 2018 at 10:47PM by Hansolo510