Monday 29 February 2016

How does one deploy a node.js API in addition with some database?

I know how to build a node.js server, how to build a MongoDB database for example, but now I have a problem (question). Let's say I want to build an iOS app (I also know how to) and use node.js to build an API that make use of the database. I need to deploy the node.js code and MongoDB, right? So I searched for Amazon AWS, I know they can host applications, databases, etc... But they have a million type of services, which one should I use? DynamoDB? S3? EC2? I guess that the real question is how does server api, database connects together so I can make requests from a mobile app?

Submitted March 01, 2016 at 03:19AM by FuckingTakenUsername

Node Returning Null when Web Scraping

I'm currently trying out some code which is meant to look for a specific torrent of Kickass Torrents as a proof of concept, but for some reason my simple code is failing to return any value besides null, despite the fact that I have confirmed that a torrent exists with the ID that I have in the program. searchTerm = "photoshop" var request = require("request"), cheerio = require("cheerio"), url = "https://kat.cr/usearch/" + searchTerm + "/"; request(url, function (error, response, body) { if (!error) { var $ = cheerio.load(body), magnet = $("[data-id='233B2C174D5FEF9D6AFAA61D150EC0B6F821D6A9'] href").html(); console.log(magnet) } });

Submitted March 01, 2016 at 01:51AM by jasch16

Help! Room automation with node nrf24

im building a room automation system with a web server using node.js and i have multiple arduinos with NRF24 around my house doing different things. I want to use nrf-node with node.js but i dont know how to display each data from the arduinos in each section i want on the pageP.S im a beginner to node

Submitted March 01, 2016 at 01:12AM by Aaronrc79

How to structure node.js/express application?

So, I've been learning node.js for some time and I'm a bit struggling with lack of patterns on how to structure the application. I'm coming from Java background.I have a classical web app - it exposes REST API in the routes. Routes are essentially controllers from MVC so I keep them very light.App has some complex business logic computation. In Java/Spring world controller would call stateless service objects which would perform the business logic on POJOs (anemic data model). These POJOs would be accessible through stateless repository (DAO) objects to abstract the entity implementation details (maybe they come from DB, maybe from another microservice).Of course I can do it like this even in node.js, but it doesn't seem to be the normal (idiomatic) way to do this. Maybe the business logic is usually implemented in more OO way (DDD?) What's your approach to design in node?

Submitted February 29, 2016 at 09:24PM by GSV_Little_Rascal

BuiltWithMeteor Weekly # February28th2016

http://ift.tt/1LrdcZr

Submitted February 29, 2016 at 08:37PM by bogdancloud

Why use a 'while' when reading all the data from a non-flowing stream?

I don't really understand why we have to use a 'while' when reading all the current data in a readable stream. The documentation says that 'If you do not specify a size argument, then it will return all the data in the internal buffer.' Then why don't we just use a single read()?Example (from the doc):readable.on('readable', () => { var chunk; while (null !== (chunk = readable.read())) { console.log('got %d bytes of data', chunk.length); } });vsreadable.on('readable', () => { var chunk = readable.read(); if(chunk != null) { console.log('got %d bytes of data', chunk.length); } });Thanks!when the documentation says that 'If you do not specify a size argument, then it will return all the data in the internal buffer.'

Submitted February 29, 2016 at 08:16PM by vangelov

Sequelize - findOrCreate on the "through" table, on belongsToMany association

Hello all,First of all, I'm rather new to Node.JS and even newer to Sequelize, so appologies if the question seems rather dumb or I'm making stupid mistake :)I have the following Model entities:Match.jsmodule.exports = function(sequelize, DataTypes) { var Match = sequelize.define('Match', { matchId: { type: DataTypes.BIGINT, field: 'match_id' }, server: { type: DataTypes.STRING }, matchMode: { type: DataTypes.STRING, field: 'match_mode' }, matchDate: { type: DataTypes.DATE, field: 'match_date' }, matchDuration: { type: DataTypes.INTEGER, field: 'match_duration' }, rankedBoo: { type: DataTypes.BOOLEAN, field: 'ranked_boo' } }, { classMethods: { associate: function(models) { Match.belongsToMany(models.Summoner, {as: 'Participants', through: 'SummonerMatch'}); } }, freezeTableName: true, underscored: true }); return Match; }; Summoner.jsmodule.exports = function(sequelize, DataTypes) { var Summoner = sequelize.define('Summoner', { summonerId: { type: DataTypes.INTEGER, field: 'summoner_id' }, server: { type: DataTypes.STRING }, summonerName: { type: DataTypes.STRING, field: 'summoner_name' }, mainChampion: { type: DataTypes.INTEGER, field: 'main_champion' } }, { classMethods: { associate: function(models) { Summoner.belongsToMany(models.Match, {as: 'SummonerMatches', through: 'SummonerMatch'}); Summoner.hasOne(models.RankedStats); Summoner.hasMany(models.RankedHistory, { as: { singular: 'RankedHistory', plural: 'RankedHistory' }}); } }, freezeTableName: true, underscored: true }); return Summoner; }; SummonerMatch.jsmodule.exports = function(sequelize, DataTypes) { var SummonerMatch = sequelize.define('SummonerMatch', { championId: { type: DataTypes.INTEGER, field: 'champion_id' }, role: { type: DataTypes.STRING }, winnerBoo: { type: DataTypes.BOOLEAN, field: 'winner_boo' }, kills: { type: DataTypes.INTEGER }, deaths: { type: DataTypes.INTEGER }, assists: { type: DataTypes.INTEGER }, championLevel: { type: DataTypes.INTEGER, field: 'champion_level' }, goldEarned: { type: DataTypes.INTEGER, field: 'gold_earned' }, item0: { type: DataTypes.INTEGER, field: 'item_0' }, item1: { type: DataTypes.INTEGER, field: 'item_1' }, item2: { type: DataTypes.INTEGER, field: 'item_2' }, item3: { type: DataTypes.INTEGER, field: 'item_3' }, item4: { type: DataTypes.INTEGER, field: 'item_4' }, item5: { type: DataTypes.INTEGER, field: 'item_5' }, item6: { type: DataTypes.INTEGER, field: 'item_6' }, summonerSpell1: { type: DataTypes.INTEGER, field: 'summoner_spell_1' }, summonerSpell2: { type: DataTypes.INTEGER, field: 'summoner_spell_2' }, largestKillingSpree: { type: DataTypes.INTEGER, field: 'largest_killing_spree' }, largestMultiKill: { type: DataTypes.INTEGER, field: 'largest_multi_kill' }, magicDamageDealt: { type: DataTypes.INTEGER, field: 'magic_damage_dealt' }, magicDamageDealtToChampions: { type: DataTypes.INTEGER, field: 'magic_damage_dealt_to_champions' }, magicDamageTaken: { type: DataTypes.INTEGER, field: 'magic_damage_taken' }, physicalDamageDealt: { type: DataTypes.INTEGER, field: 'physical_damage_dealt' }, physicalDamageDealtToChampions: { type: DataTypes.INTEGER, field: 'physical_damage_dealt_to_champions' }, physicalDamageTaken: { type: DataTypes.INTEGER, field: 'physical_damage_taken' }, trueDamageDealt: { type: DataTypes.INTEGER, field: 'true_damage_dealt' }, trueDamageDealtToChampions: { type: DataTypes.INTEGER, field: 'true_damage_dealt_to_champions' }, trueDamageTaken: { type: DataTypes.INTEGER, field: 'true_damage_taken' }, minionsKilled: { type: DataTypes.INTEGER, field: 'minions_killed' }, neutralMinionsKilled: { type: DataTypes.INTEGER, field: 'neutral_minions_killed' }, visionWardsBought: { type: DataTypes.INTEGER, field: 'vision_wards_bought' }, sightWardsBought: { type: DataTypes.INTEGER, field: 'sight_wards_bought' } }, { freezeTableName: true, underscored: true }); return SummonerMatch; }; Now I'm trying to create a new match, and associate it with a summoner, and I'm doing the following:summoner.createSummonerMatch(matchInfo, matchDetails).then( function () { callback(); return null; }); Where matchInfo contains the attributes of the "Match" entity, and matchDetails contains the attributes of the "SummonerMatch" entity.This is fine and all, but it doesn't check if the match already exists, so I'm trying to use findOrCreate here.models.Match.findOrCreate({ include: [ {model: models.Summoner, as: 'Participants'}], where: { matchId: matchInfo.matchId, server: matchInfo.server }, defaults: { matchMode: queueType, matchDate: new Date(matchCreation), matchDuration: matchDurationInSeconds, rankedBoo: rankedBoo } }).spread(function(match, created) { console.log(created) }); This almost does the trick (creates a new row in the Match table, but not in SummonerMatch). How would I proceed to insert information into SummonerMatch as well? Tried a few things (adding attributes to defaults, switching it to an array, tweaking around with the include, but no success so far.I'm prolly missing out on something, but I can't figure out what. Any help is much appreciated :)[:EDIT:] Formatting :)

Submitted February 29, 2016 at 06:31PM by Pain5Q

How do you deal with plugins that use different promise libraries?

For promises, I've been using await/async using a babel polyfill in the latest release of Node. Several packages I use (like Sequelize) use existing promise libraries like Bluebird and Q.Is it ok to wrap these in promises in the JS promise (e.g., 'new Promise' in ES6 around the Bluebird/Q promise)? Or is there another way to mix the built in Promise functionality with the ones chosen by external libraries?

Submitted February 29, 2016 at 06:39PM by Federalist85

How do you identify the line number of an error in your Node.js code?

I am mostly loving the experience of coding in Node/JS. The hardest part, though, is identifying where an error is triggered - and was wondering if anyone here has feedback.I'll often make a mistake (not close a bracket, skip a comma in an object declaration, pass a bad variable to an external library call, leave a variable undefined), and I've found these really hard to debug for a few reasons:import statements seem to fail without complaining (when there is an error in the imported file), so that errors are thrown on the later call to a function in the imported file (which is now undefined) - using Express (where I have routes in app.js and then import various controllers), this often leads to a hanged or a function not found error, WITHOUT any indication of a line number of where the issue could beWhen there is a stack trace (esp with external libraries), it often doesn't reference my code at any point of the stack trace; I'm assuming this has to do with the async nature of js, but it makes it really hard to find where the issue is happening (example, a Sequelize ORM call fails with a cryptic message, a stack trace 15 deep referring to code in the library and promise library, but no line number for the originating call in my code)I have taken to naming every function (so no anonymous functions), and this doesn't seem to help significantly (and also I don't know how to make this work for ES6's new arrow functions).What is best practice to get more descriptive error messages?

Submitted February 29, 2016 at 06:28PM by Federalist85

Basic Express API (MongoDB, ES2015,Webpack,Mocha)

http://ift.tt/1QGK901

Submitted February 29, 2016 at 04:45PM by dbuarque

Handling User Authentication with the MEAN Stack (updated!)

http://ift.tt/1Qg79WG

Submitted February 29, 2016 at 02:45PM by michaelherman

Sunday 28 February 2016

Good examples of separating route controller and model?

I'm using Express.js and was wondering I should have a have a model module for each collection, or try and have a shared model folder for collections that have similar operations. Moreover, I'm unsure if the model methods should read in entire objects i.e. for what will be set, or if i should separate out each of the parameters? Is it ok to have some db calls in the controller? For instance, insertion basically just takes the validated req.body and saves it so abstracting it doesn't seem to save me much as all.Thanks for the advice.

Submitted February 29, 2016 at 05:31AM by -proof

Passport.js twitter auth without cookies?

is it possible to handle twitter authentication via express and passport.js, without using cookies?

Submitted February 29, 2016 at 01:43AM by axxxxxxxy

Looking for professional node.js dev

As the title say, i am looking for a new developer since our last one got stuck in some other projects. Experience required: *MySQL *PHP *Node.jsSo this work would consist mainly of improving our current code and fixing some bugs we are having. PM for further details

Submitted February 29, 2016 at 12:20AM by imrEs

Found a fun board game website using socket.io to connect users to tables and rooms.

http://ift.tt/NU0AgZ

Submitted February 28, 2016 at 11:29PM by TheOneRavenous

A AWS Lambda Microservices Architecture for Node.js

http://ift.tt/1oR4ES2

Submitted February 28, 2016 at 08:42PM by dbuarque

nodejs slowdown and irregular behavior with exec, please advise

How can I track down the cause? I am running some nodejs programs on an Intel Edison (1 GB ram). There are no synchronous calls, yet some code which loops (via async) and calls exec to trigger an external program slows down, behaves strangely, and then speeds up again.What tools can I use to root cause this? lots of free ram still while running, and no errors are thrown. Note that if I simply call this program from a bash loop, all is well. No slowdown and no irregular behavior.Behavior is the same on different versions of node -- 0.10.38 and 4.2.6...

Submitted February 28, 2016 at 07:01PM by therewontberiots

Come and see me in video chat. My name is RITA2112. I won't let you sleep. f2TGg6GEW65

http://ift.tt/213SkcP

Submitted February 28, 2016 at 03:34PM by olernen

Going slightly crazy trying to get popular oauth2 NPM packages working, SSLv3 problem

I've tried a variety of Oauth2 packages in an attempt to connect my Node app with Google's oauth2 services -- something I've done successfully in the past.Right now I'm getting the same error no matter what I try, which is "SSLv3 methods disabled". I'm to understand this was a fairly recent change in Node to disable SSLv3 in order to protect against the POODLE vulnerability in SSL. My testing shows that if you don't supply your keys and cert with the request object, everything defaults to SSLv3 (which is disabled).The thing is -- none of the popular google oauth2 packages seem to allow the option to pass your own key & cert into the request. I can monkey-patch my own keys in by hardcoding them but, given that this should be something affecting a lot of people, I feel like I'm missing something and/or doing something wrong.Anyone come across this problem? Here's the typical stack trace;server-0 Error: SSLv3 methods disabled server-0 at Error (native) server-0 at new SecureContext (_tls_common.js:23:20) server-0 at Object.createSecureContext (_tls_common.js:42:11) server-0 at Object.TLSSocket._init.ssl.onclienthello.ssl.oncertcb.exports.connect (_tls_wrap.js:999:48) server-0 at Agent.createConnection (https.js:80:22) server-0 at Agent.createSocket (_http_agent.js:172:16) server-0 at Agent.addRequest (_http_agent.js:141:23) server-0 at new ClientRequest (_http_client.js:137:16) server-0 at Object.exports.request (http.js:31:10) server-0 at Object.exports.request (https.js:197:15) server-0 at Request.start (MY_LOCAL_PATH/node_modules/google-auth-library/node_modules/request/request.js:799:30) server-0 at Request.write (MY_LOCAL_PATH/node_modules/google-auth-library/node_modules/request/request.js:1360:10) server-0 at end (MY_LOCAL_PATH/node_modules/google-auth-library/node_modules/request/request.js:556:16) server-0 at Immediate._onImmediate (MY_LOCAL_PATH/node_modules/google-auth-library/node_modules/request/request.js:584:7) server-0 at processImmediate [as _immediateCallback] (timers.js:383:17)

Submitted February 28, 2016 at 01:49PM by khoker

Do you use nginx as a reverse proxy for your main node app? If so, can it double as a load balancer?

As the title says, do you use nginx as a reverse proxy for your main node app? If so, can it double as a load balancer?Basically my app is analytics related, so a huge amount of traffic will get sent to it. I'm wondering how best to handle this large server load.Should I have a load balancer before my nginx reverse proxy (with two or more nginx reverse proxies for redundancy)?Should I have multiple node apps behind the reverse proxy?So it might look like:load balancer -> reverse proxy -> reverse proxy -> node app -> node app Any thoughts appreciated.

Submitted February 28, 2016 at 12:45PM by no_comment_acc1

json.filed, Processor of json file

http://ift.tt/1LNiQ3a

Submitted February 28, 2016 at 11:05AM by 7k8m

Saturday 27 February 2016

mongolab-data-api: A NodeJS wrapper for MongoLab’s Data API

http://ift.tt/1SMi6mA

Submitted February 28, 2016 at 02:18AM by theprimeprogram

gen-readlines: A generator based line reader

Hey all, looking for input on my generator based line reader.http://ift.tt/1MPKPhM feedback is greatly appreciated.

Submitted February 27, 2016 at 10:53PM by qudat

eserozvataf/sey: Simple JavaScript build tool with declarative and easy configuration

http://ift.tt/1QkfhU1

Submitted February 27, 2016 at 09:59PM by larukedi

What's going on with the spam in this sub?

Can the mods do anything about it?

Submitted February 27, 2016 at 03:55PM by jamesaw22

My first node app. A Slack slash command for compliments. Would love feedback

http://ift.tt/1LLPIt8

Submitted February 27, 2016 at 03:15PM by silent1mezzo

I've found the perfect girl - the love of my life qcmepZB5xb

http://ift.tt/1QNwlqW

Submitted February 27, 2016 at 03:20PM by stelarga

Check out my latest practice project: NodeJS web framework inspired by the Symfony framework.

http://ift.tt/1QaQ8x2

Submitted February 27, 2016 at 03:07PM by keewnn

german amateur blonde milf fucking with ugly young guy J914DdG

http://ift.tt/1Ll99hl

Submitted February 27, 2016 at 02:44PM by ostilty

Wring – Command-line tool for extracting content from websites using CSS Selectors and XPath

http://ift.tt/1OBRRHA

Submitted February 27, 2016 at 11:44AM by meegee

Gifi: Watch GIFs while you `npm install`

http://ift.tt/1T91eXz

Submitted February 27, 2016 at 11:26AM by ketsugi

Express alternatives in production?

Is anyone using an Express alternative (Koa, Hapi, Strapi, Restify, Other?) in production? What's your experience been like?I don't want this to be an Express bashing/protecting thread. Express, i'm sure, will continue to be alive and well for a while yet - but it does feel like all the politics and drama surrounding it atm might stagnate dev for a while. With ES2015 landed, and ESNext hot on it's heels, I think it's important to pay attention to frameworks that will evolve with JS - and I'm not sure Express is going to be able to until it's got it's house in order. I might be wrong, but due diligence can't be a bad thing...

Submitted February 27, 2016 at 10:37AM by jamesaw22

Friday 26 February 2016

dougwilson: I am closing down Express 5.0

http://ift.tt/1oNy4Ao

Submitted February 27, 2016 at 02:31AM by abkibaarnsit

promise-poller: A basic poller built on top of promises

http://ift.tt/1QiUOSW

Submitted February 26, 2016 at 11:32PM by thinksInCode

Help with direct node-mailer

Hello everyone,I am working on a somewhat unconventional project involving email.I am wondering how I can ensure that an email I send through node-mailer (hosted on heroku) will always go to the spam folder.To be clear: the emails will not have malicious code in them. It would be just html/text. But I want to ensure that they will ALWAYS go to spam.My mailOptions are currently: var transporter = nodemailer.createTransport({direct:true}); var mailOptions = { from: '"' + person.fname + ' ' + person.lname + '" <' + person.email + '>', // sender address to: person.email, // list of receivers subject: '', // Subject line html: html //html email }; I set it so the person would essentially be getting an email from themselves. Gmail flags it as a potential "phishing scam" but still sends it directly to inbox.Is there a free way to proxy it to some other server to raise more suspicions?I'm having a very difficult time finding help through google because everything is geared towards people avoiding spam. But even when I do the opposite I can't seem to get it to work.Any help is appreciated. If this is the wrong subreddit for this request, I apologize.

Submitted February 26, 2016 at 06:04PM by thrownaway124536

How to get a "thumbnail image" from a link in Node or JS? For instance, when someone shares a video on Facebook, it auto-generates a cover image for the link from data on the page. I'm most interested in generating images from video pages.

No text found

Submitted February 26, 2016 at 03:27PM by derridad

Usage of Cloudant in LoopBack Applications (X-post r/programming)

http://ift.tt/1KPKqBK

Submitted February 26, 2016 at 02:39PM by mhenke

Should I be using something like ZMQ or just 'request'?

I'm fairly new to the world of ZMQ and still am unsure if it would be the correct solution for what I'm trying to accomplish:Client requests data from server A which needs to get data from server B, where server B could someday be made up of more than one server, but for the near-term won't be.The data that's coming back could be quite a lot of data from server B, so I'm not sure if this would end up being an issue with 'request' and node performance. Thoughts? Ideas?Thanks!

Submitted February 26, 2016 at 01:08PM by Seus2k11

Thursday 25 February 2016

Node v5.7.0 (Stable) Released

http://ift.tt/1WFrwhB

Submitted February 26, 2016 at 04:31AM by Fady-Mak

React and Webpack Question

I'm trying to es6 import a component and getting the error "Error: Cannot find module "./Navbar.js""Navbar.js is in the same file as the index.js that I'm trying to import it in

Submitted February 26, 2016 at 01:32AM by mxzt99

Getting into nodejs etc. and looking at an edx course (MEAN stack) and it uses wagner-core. Is it so stable that it hasn't been touched for months or do frameworks take care of DI or is there an alternative to wagner?

No text found

Submitted February 25, 2016 at 09:02PM by gmfthelp

AquaJS floats a framework for JavaScript microservices

http://ift.tt/1SBk6hd

Submitted February 25, 2016 at 07:17PM by grve25

Weekly newsletter around the best of Node.js & React.js

http://kodezilla.com/

Submitted February 25, 2016 at 07:21PM by dbuarque

Using Node to spawn an SSH process and then input a password?

So two things right off the bat, on the system I am working in, we cannot use key-based authentication, and I cannot install a new package such as sshpass, I have to work within these limitations, despite the other two being great solutions.So basically the title is my problem. I can spawn a child process in node to create an SSH connection (I am creating a tunnel for proxy reasons) but the ssh connection requires a password and I cannot for the life of me figure out how to input the password also through node. Any help?

Submitted February 25, 2016 at 05:34PM by Woofington

SenecaJS and the problem of transactions in microservice architecture?

Hello, I'm start to develop a webapplication in microservice architecture. I will use SenecaJS framework.It has good documentation but I don't understand if I can solve the problem of "transaction across microservices" with it or I should implement something by myself.Have you a suggestions?

Submitted February 25, 2016 at 02:55PM by hadokee

Posix command shell in Node.js

http://ift.tt/1PXmWJU

Submitted February 25, 2016 at 11:12AM by wo1fgang

Reading and Writing to file simultaneouly in Nodejs

http://ift.tt/1zoJZ4G

Submitted February 25, 2016 at 10:54AM by shsh1

lodash map values on array?

does it work? if so, what's the arguments in the function? if not, what should i use for the same result?ty

Submitted February 25, 2016 at 08:43AM by mxzt99

Wednesday 24 February 2016

Has anyone here made a groupme bot or really any chat bot? I'm trying to make my own and could use some help.

I am very new to node. I just learned that you can make groupme bots and since I use it all the time I thought I would try it out. I followed this sample, http://ift.tt/1CybvDL, project and got it to work no problem. I'm sure I could fool around with that a bit and do some simple stuff, but I want to go further with it.The problem I'm trying to wrap my head around is the development process, especially the debugging and testing processes. I come from a ASP.NET and C# world so I just use visual studio to debug. I have also fooled around very slightly with python with just writing to the console type of debugging. I just don't understand how to go about it with making a bot, especially if you have to deploy it to heroku to get it working.Right I have some working code but I would like to go through it as it is getting responses to see what is happening and eventually do that for my own bot. I would try to look for tutorials but there doesn't seem like there is much out there.So basically what I'm asking is how do you launch a bot locally and test and debug groupme chat responses for it?

Submitted February 25, 2016 at 05:08AM by targus_4d3d3d3

Is it okay to loop in express.js given that loops are blocking?

For instance, how bad is it to loop over the req.body fields as a middleware, and to confirm that they are within the bounds of my scheme? As another example, how bad is it to do a lookup with mongo and loop over the cursor with the .each() method, applying a quick formatting operation to the response?

Submitted February 25, 2016 at 05:09AM by -proof

Steam Community Market API

http://ift.tt/1Rp0aLr

Submitted February 25, 2016 at 03:25AM by Kirpu

[Security] Validate where you send your users, people

http://ift.tt/1p6e6Rc

Submitted February 25, 2016 at 01:55AM by karldyyna

Favorite website boilerplate?

Do you have a favorite boilerplate or starting point? I'm going to be starting a new website on the MEAN stack and I'm looking for a project to kick-start development. A couple pages and a login system would be ideal. So far I've found:http://ift.tt/MkUlm0 http://ift.tt/1WJTLMg do you use when starting a new project?

Submitted February 25, 2016 at 01:06AM by fyzbo

Live stream of the express community hangout

http://ift.tt/1QegCvB

Submitted February 25, 2016 at 12:27AM by johnwesleytodd

A sample http://ift.tt/1xcIQ1T App (people keep asking for examples, right?)

http://ift.tt/1S1Zuh9

Submitted February 24, 2016 at 09:36PM by jon_stout

A tutorial on using node with pooled connection to MySql, and user authentication with passport.js

Please critique the code shown in my tutorial on my website: http://ift.tt/1T7cCmx view full source on github:http://ift.tt/1Q0zb8B am sure there are places for me to improve my code, particularly in how I my routes are accessing my main connection, and in the user auth section. The code I am linking to is what runs www.NodeHire.com, a node project I am working on, and is a site for both Developers and Business owners to post and apply for Node.js Development jobs. If this is the wrong place on reddit for this posting please let me know and I will take it down.

Submitted February 24, 2016 at 05:30PM by SmilingMolecule

Tutorial: Easily Create API Services in Node.js with Nodal

http://ift.tt/1KK55aD

Submitted February 24, 2016 at 04:43PM by keithwhor

js-pages - Custom Git script to compile JSDoc / ngdoc and deploy to gh-pages

http://ift.tt/20VajSC

Submitted February 24, 2016 at 03:56PM by machinehead115

Getting Started with ECMAScript 2015

http://ift.tt/1QE3WDG

Submitted February 24, 2016 at 03:24PM by dynamicallytyped

Hi guys! I just recently started on a game server framework, and I have a couple of questions.

I have read quite a few code reviews on this subreddit, and I've tried to follow the good applicable advice where I could. I'm not an expert with node.js, and if anyone has the time to read some of my code over and let me know if it's just absolutely terrible or if there is something that I should change that I missed then that would be awesome.http://ift.tt/24p8kdW I do have a couple of questions for everyone:Event Emitters. How efficient are they? Will my program suffer greatly if I have hundreds of objects which derive from the EventEmitter object?util.inherits() or lodash for inheritance? I had a lot of trouble manually manipulating the prorotype of an object the traditional javascript way with Player.prototype = new EventEmitter(); Is this a node.js thing or could it be because of where I was doing this in the program?

Submitted February 24, 2016 at 02:30PM by ThrowinAwayTheDay

Full Stack Developer Course

http://ift.tt/1S0Wu4H

Submitted February 24, 2016 at 01:28PM by train255

Introducing DoveCôte: Microservices as a Solution

http://ift.tt/1PZxzvD

Submitted February 24, 2016 at 12:54PM by fthrkl

What is the point of using process.nextTick() with this code given it works fine without it?

Have a look at this express.js example which demonstrates how to deal with errors http://ift.tt/1R0wJwp line#32, a route is defined as below:app.get('/next', function(req, res, next){ process.nextTick(function(){ next(new Error('oh no!')); }); }); I was wondering why did the author use process.nextTick() given the app still works without it?

Submitted February 24, 2016 at 08:40AM by segmentationfaulter

Tuesday 23 February 2016

Continually run task in Node?

Hello,I'm looking to create a node app that will be run with PM2 or forever (undecided) and will be responsible for reporting the status of a service (through an API) to a dashboard. Basically it just hits a list of API endpoints, gathers the resulting data, and posts it to another API endpoint for a dashboard (basically a middleman). What's the most appropriate way to execute a task like this continuously in Node?

Submitted February 24, 2016 at 03:18AM by aliasxneo

Core dumps are the most important way to debug a crashing program. Why aren't they supported in Node?

I'm an embedded developer using Node for my next app. One thing that absolutely terrifies me is the lack of decent post-mortem debugging options, especially since my code runs on offline/isolated machines.Explanation of core dumps for those that don't know You know how when you're using Node Inspector and put a debugger breakpoint, you can see (and navigate) the stack, as well as see the value of all the local variables in the current scope? A core file is a debugger breakpoint that's automatically generated for you when your application crashes, at the exact line where it crashed. I can't think of anything more easy to debug than "the program crashed at this exact line, and here's a debugger breakpoint and all the info you need to fix it, including backtrace and locals". This makes all but the worst bugs trivial to fix. When writing native code, using core dumps is trivial: on Linux, enable them with "ulimit -c unlimited", let the app crash and generate a core file, then load the core file in your debugger. End explanationI can still do this for Node, by adding a handler to process' uncaughtException' event which calls process.abort(), or dumping a core file on-demand. However, the generated core file is a V8 program, and I don't know how to turn that into something relevant to me as a Node dev. I don't care about the V8 backtrace/locals, I care about the Node backtrace/locals.I'm surprised Node lacks official support for something this useful, i.e. a way to turn that V8 dump into a Node dump. A mere printing of the backtrace is not enough, it just points you in the general direction of the problem. It requires you to look up functions manually, and usually to write lots of logging statements to trace values and such. It's just a big painful question mark when a bug is hard to reproduce. Compare that to the automatic magic of core dumps.I know the Linux+Native ecosystem is a lot more evolved than Node's, and that's why I have that free magic. It's just disappointing that debugging is now harder for me in a more productive high-level language. I fear once I've shipped my first app, I'll have to deal with rough bugs that will take more time to solve than I saved by using Node.

Submitted February 23, 2016 at 08:41PM by MachinTrucChose

How to get my website built on node deployed online?

Everything has already been running in my local environment. I'm trying to deploy it on Digital Ocean, and there are options for 1-click node installations, general Ubuntu 14.04 installations, etc, and the tutorials really only cover how to get simple hello-world apps runningHowever, I have no idea how to get my code on my machine to their servers! How do I do this? (and not just on digital ocean anywhere! This seems really complicated for I don't know what reason).

Submitted February 23, 2016 at 08:08PM by happymanwonton

NEWS NEWS NEWS wZCgJ

http://www.nytimes.com/

Submitted February 23, 2016 at 05:39PM by granmepo

Any good tools for quickly throwing together API documentation?

I've just been updating a README with the routes for the team, but was wondering what you guys/gals use.

Submitted February 23, 2016 at 05:46PM by -proof

node-currency-swap: Universal exchange rate library with support for multiple providers

http://ift.tt/1KtskWf

Submitted February 23, 2016 at 02:33PM by khurrum_tajawal

Up and Running with Grunt

http://ift.tt/1Tvc0po

Submitted February 23, 2016 at 01:33PM by bencso

Monday 22 February 2016

Examples of basic pages using node.js from separate server?

New to node.js and excited about the possibilities. Is it possible to have a webpage that uses node.js code from an external resource? Perhaps with cors or jsonp? Please share and links or examples if you have any.Some more background is that our main work website is on Drupal7, but we do not have full admin control (it is reserved for our league, which controls sister sites of our counterparts across the nation). So as a workaround, I'm trying to pull in node.js that is set up separately on our Digital Ocean server. feasible? thanks in advance for any insight

Submitted February 23, 2016 at 05:35AM by ajsingh007

Linux commands on Windows in straight Node

http://ift.tt/1oXTNFx

Submitted February 23, 2016 at 04:17AM by dt3ree

Template your base files and easily generate them from GitHub.

http://ift.tt/1SOQr4h

Submitted February 23, 2016 at 01:43AM by everysquare

Creating and Publishing a Node.js Module

http://ift.tt/1yhJPAs

Submitted February 22, 2016 at 10:49PM by Snowjunkie21

Process status in Node.js as you've always wanted

http://ift.tt/1QTCOuy

Submitted February 22, 2016 at 10:18PM by zzarcon

BuiltWithMeteor Weekly # February21st2016

http://ift.tt/1LCU99y

Submitted February 22, 2016 at 08:55PM by bogdancloud

POST mysite/uploads 404 -maybe some of you guys could help me out here?

http://ift.tt/1oxAUsE

Submitted February 22, 2016 at 08:57PM by Stwic

Building local login w/ Passport & session cookies. Login persistence issues w/ CORS (using webpack-dev-server). Anyone have the same issue?

Hi all. I'm using webpack-dev-server to serve up my files during development so I get that sweet, sweet hot reload. However, my API is on a different port, so I have to enable CORS for the time being.When I submit the login form with an xhr (not using action, just submitForm + $http service), it gives me the login successful message and writes the cookie to the browser as it should. However, subsequent requests from the browser that check for "req.user" on the server can't find it. When I do the same subsequent requests in Postman, however, it works just fine.Just to be sure, I hosted the front-end from Express instead (rather than webpack-dev-server on a different port), disabled CORS, and both the browser and the Postman workflow were working properly.I'd like to be able to use the hot reload / other goodies and test the login system / other APIs at the same time. Am I missing some fundamental knowledge about how session IDs / http-only cookies operate in a CORS environment? I googled around quite a bit and couldn't find anything definitive.Any tips would be appreciated :)

Submitted February 22, 2016 at 05:09PM by excessivecaffeine

Crons sabotaging my event loop

I've got a node script that needs to "check in/heartbeat" every 5sec. I'm doing this with a simple setInterval.This same node script handles cronjobs. I'm using node-cron and up to 5000 crons may fire at exactly the same time. The function that gets called when the cron fires is semi-CPU intensive (for a few hundred MS), so when these crons fire, my setInterval heartbeats don't check-in.In my tests, my setIntervals go silent for about 60sec.So, I figured that I'd write a test app that delegated the CPU intensive function to a cluster worker. So when the cron fires, the function now simply says worker.send('start')When the cluster worker is done with the CPU intensive task, it sends a message back to the master process saying 'done'.Now... My setIntervals is STILL go silent for about 40 seconds - even if I spawn off a worker for every CPU core (8) and send the CPU intense job to a random worker.Any thoughts on making this more efficient (assuming I can't randomize the cron firing timing a bit)?

Submitted February 22, 2016 at 04:34PM by TheNodist

Medium Post: Why NodeJs Engineers Should Work In The Music Industry In 2016 ♪♫

http://ift.tt/1SNaFLN

Submitted February 22, 2016 at 03:06PM by louizik

Where / how to put in a REST API

Hey guys! I'm pretty new to back-end developing in general so I'm a little confused about where / how to put in a REST API in my application.I have a file (server.js) which serves static files and does some simple routing, for which I use the express.js framework. Now I need to integrate a REST API layer which would be placed between the frontend and aforementioned server.js file.When you would perform a HTTP method from the frontend, you would go to the REST API which would contact the server.js backend file.We are using this REST API since we will also be developing an Android application which will utilize this layer.Now, the actual question: do I need a new express server running especially for this REST API layer? Or what would I be able to do as an alternative?

Submitted February 22, 2016 at 02:35PM by Kattoor

Using Node.js Event Loop for Timing Attacks

http://ift.tt/1XAmCnh

Submitted February 22, 2016 at 12:13PM by wo1fgang

[Advice] Passing res to a shared function

What is the best way to do the following:function shared(req, res) { let filename = req.file.filename somePromise.then(() => { res.json({filename}); }) } module.exports.example = (req, res, next) { //more code here shared(req,res); } module.exports.example2 = (req, res, next) { //some other code here shared(req, res) } I think that this is ugly but that's what I came up with, given that the functions execute different code before using the shared one

Submitted February 22, 2016 at 11:27AM by cryptocool

Not satisfied with nconf? Here is alternative.

http://ift.tt/1RhyjwC

Submitted February 22, 2016 at 08:14AM by deadarius

Sunday 21 February 2016

[Security] What do you know about clickjacking?

http://ift.tt/218c5W2

Submitted February 22, 2016 at 04:20AM by karldyyna

Node CMS like Perch?

I'm looking for a CMS that's not based in PHP, but node. The main criteria is to assist in serving HTML content I've already created - one that's not concerned with templating or themes or anything, but more like Perch.Perch is PHP based, and it accepts your created HTML, and you can turn fragments of it in to templates that you can change in the GUI.Anyone know of anything like this for Node?

Submitted February 22, 2016 at 02:17AM by natdm

Help finding a node.js / MQ expert to make transition from socket.io

Are you, or can you think of, a freelance node.js expert with experience using MQs? Would really appreciate any help.Our development team has developed a multi-application data platform that utilises the MEAN stack in addition to some custom, developer specific, middleware that utilise socket.io / Mongoose to transact data between our applications and APIs.We are planning a migration over to a more robust industry standard configuration that utilises MQs and an industry standard RESTful framework, in addition to a combination of relational (e.g PostgreSQL) + document based (MongoDB) databases.I am looking for a senior JS developer with considerable experience working in Node.js and micro-service architectures to play a central role in this transition, working with our core dev team and providing guidance where necessary.Initial term: 2-weeks (immediate start)Rates: USD $600 p/day (flexible dependant on applicable experience)Requirements: Extensive Node.js, MQs + RESTful frameworksFull project requirements available to suitable developers.About the company: We are building a platform / service that will enable consumers to take control of when and how their data is used, in addition to providing an opt-in mechanism for digital advertising; reversing the impact of ad block technology and EU data privacy regulation. In short, a digital marketplace where consumers can dynamically license their personal data and attention to brands in return for a payment.

Submitted February 22, 2016 at 01:39AM by revilon_

Remote Node jobs

Hello,I live in a remote location in USA where Node jobs are not in demand. I know HTML, CSS, and Javascript Syntax but I have not work in a real company.What do I need to do in order to land a remote Node job?Anyone here landed a remote Node job as a fresher?Thanks

Submitted February 21, 2016 at 10:41PM by webjango

Public Alpha: Doclets.io - JSDoc goes CI. Simple automated API-Doc generation for Javascript

https://doclets.io

Submitted February 21, 2016 at 04:29PM by gelipp

Should we write function coupled to req/res objects?

So I've got a usual express application with the controllers calling functions from Models/Services, etc. E.g. a controller will extract data from req.query and pass those as arguments to a Model's function.My question is, should I write Model's functions to accept the req object instead and do the data extraction? Would that coupling to the req object be safe? Can I later reuse those functions with another Router?

Submitted February 21, 2016 at 12:34PM by kostarelo

Saturday 20 February 2016

REST API route design.

Does it make sense to have a POST call as such POST /foo, where everything is in the body and then for PUT you include the item id as a parameter of the URL? Or should I keep both in the body?

Submitted February 21, 2016 at 06:19AM by -proof

How does .babel in a file name work?

I see file names with .babel in it, like myshit.babel.js, I guess it allows es6, how does it work?

Submitted February 21, 2016 at 05:03AM by mxzt99

Synchronous vs Asynchronous (AJAX) Web-App Model tutorial with Node, Express & jQuery

http://ift.tt/1oTzLMD

Submitted February 21, 2016 at 04:35AM by TLI5

Issues with CSS not applying

Very new to Node JS, HTML, and JavaScript. Any corrections and help will be appreciated.Currently I have a node file that requires my html file and hosts it. Within that html file it has a link to my css stylesheet. However, it does not use the css file. When inspecting the page it sees the css file but does nothing with it. If I save both files in my text editor and drag that to the browser it uses the css file without issue.I have exhausted myself trying suggestions from google searches and searches on reddit. Help me reddit, you are my only hope!**Directory Tree** /root |_ nodejs |_ uiTesting |_ main.js main.html style.css **main.js** var http = require('http'), fs = require('fs'); http.createServer(function (request, response) { fs.readFile("main.html", 'utf-8', function (err, html) { response.writeHead(200, {'Content-Type': 'text/html'}); response.write(html); response.end() }); }).listen(80); **main.html**

This is just a test

**style.css** p { font-size: 40px } Also, any suggestions on how to properly create a directory tree for node.js or webpage creation in general would be helpful.

Submitted February 21, 2016 at 01:42AM by jarscohar

New to Node, could really use some code review on a very small project

New to node, .net background.I am used to having MS dictate how my project should be structure, node is giving me too much rope to hang myself with!I have a very basic app, which offers local user authentication, registration, and forgot password.Before i branch and start building out the guts of my app, i could really use some coaching on how to improve the structure of my code.I feel like its fairly clean, but certain there is room to improve before i move o n and star amplifying bad habits.my project is here: http://ift.tt/1Q881hi would appreciate any feedback. particular points i am not confident in are as follows:1) I tried to keep my server.js file as minimal as possible by modularizing my code into config(db connection), models(User), middleware(passport initialization), and routes.2) i dont think im going about handling routes well, as my routes grow this single file will become unwieldy... suggestions?3) is initializing my passport in a module a wierd thing to do?4) is my user model structured well? I expect to build other models using this as a template.any advice appreciated!

Submitted February 20, 2016 at 10:19PM by HoneyBadger08

Created a simple MySQL util for node

http://ift.tt/1VuRsw4

Submitted February 20, 2016 at 05:04PM by c0d3-x

Building a File Uploader with NodeJs

http://ift.tt/1OlOgNJ

Submitted February 20, 2016 at 03:56PM by Fady-Mak

[Tutorial] Building Very Simple RESTful API for Chat Backend in Node/Express

http://ift.tt/1L13UTK

Submitted February 20, 2016 at 04:03PM by SlatePeak

Do you trust unique field indexes on the database?

For example if a field is indexed to be unique, do you let the db do its thing and prevent a new write of a document with the same field (in turn popping up an err in the callback), or do you explicitly check for the existence of a collision in your API?

Submitted February 20, 2016 at 03:35PM by -proof

Remote debugging tool

Hi All,I've started a new project to help you edit and debug remote code. Documentation is not complete yet, but any feedback is appreciated.http://ift.tt/1Q7ucUT

Submitted February 20, 2016 at 02:26PM by gilad_no

Socket emit only in specific page

Hello, I have node app that is sending things to PHP based website. Here is my question, how to start to emit socket only if user is only in for example on page /profile/[regex]/groups. Because now even if user is in any place on the website node is emitting a message but he just doesn't recieve it. I want to do it using one node app working on one port.Here is how i include this node app in PHP app: var socket = io.connect('http://localhost:3000'); And this is attached to every single page in my website to I need to do it in node. Thanks :)

Submitted February 20, 2016 at 01:04PM by Gurlox

Building APIs with Node.js and ES6

http://ift.tt/1TqZ57G

Submitted February 20, 2016 at 12:37PM by caio-ribeiro-pereira

Friday 19 February 2016

Any bottom-fixed progress bar for the terminal?

I'm looking for a nice bottom-fixed progress bar for the terminal, that I can make disappear when everything is done.I need this king of progress bar so user can look at logs and the overall progress (bar) at the same time.http://ift.tt/1ud1FDK is nice but not bottom fixedhttps://github.com/chjj/blessed is overkill!

Submitted February 19, 2016 at 10:04PM by yvele

New node logo

https://twitter.com/mikeal/status/700751984987475968/photo/1

Submitted February 19, 2016 at 08:03PM by a0viedo

Token based authentication in node.js using passport

http://ift.tt/20JDms4

Submitted February 19, 2016 at 08:02PM by tchockie

Creating a URL Shortener with NodeJs, Express, and MongoDB

http://ift.tt/1WvJEKV

Submitted February 19, 2016 at 07:08PM by Fady-Mak

Express: a clean way to keep track of passing data / dependencies between middleware? Or just attach properties to req?

A common pattern in Express is to have a pipeline of middlewares that prepare data/services for the route handler:bodyParser middleware parses the params and definesreq.bodyyour middleware checks for req.body.widgetId and maybe fetches some data and attaches it to req.widgetyour router handler for /show-widget readsreq.widget to return a response, or skips the response if it's absent by calling next()a final 404 handler catches any skipped routes and generates a 404 responseThe problematic issuesIt works and is nicely composable (you can always switch out individual middleware implementations, as long as they manipulate req in the same way). But two issues bother me:req namespace already has stuff on it, it gets polluted and collisions could happen between middlewares that are careless.Careful documentation is needed to keep track of which properties are expected and which are attached by each middleware, and all the dependencies between middleware.Making services available to middleware/handlersWhen middleware/handlers need access to services like DB or external API access, I'd like to benefit from the composability and inversion of control of middleware too, so the perfect simple solution looks is to attach services to req or to req.app (which is a pointer to the express app, for app-wide services).It's especially relevant when the service is request-specific, like if I have req.user.oauthAccessToken so the external API call concerns this particular req. I could have a service called req.fetchUserDataUsingAccessToken() which is attached to req by a middleware and which depends on that token property being present. But that's a further extension of the issues above.Testing middlewareI can test middleware functions in isolation, by feeding them a contrived req object and afterwards checking that req was mutated as expected. That's great. But I don't have anything helping me ensure that the full middleware stack is wired up properly and in the right dependency order.What I already looked atResearch is pointing me in the direction of express-based dependency injection, and I found express-di and express-dinja but they engage in monkey-patching or they mess with the standard req, res, next signature so I'm hesitant. I want to keep things easy to grok, and to stick to standard Express "idioms" as much as possible.So, any suggestions for how to manage lots of middleware while keeping it decoupled, composable and easily testable?What are the idiomatic, best-practices solutions?

Submitted February 19, 2016 at 03:49PM by ecmascript2038

What do Node hiring managers want?

Node hiring managers, what sort of projects and prior work are you hoping to see from candidates? Are there any red flags you're looking out for?

Submitted February 19, 2016 at 02:47PM by mikeatgl

Node.js: From Zero to Bobble with Visual Studio Code

http://ift.tt/1mFI78M

Submitted February 19, 2016 at 10:59AM by wo1fgang

Thursday 18 February 2016

node-currency-swap: Universal exchange rate library

http://ift.tt/1KtskWf

Submitted February 19, 2016 at 07:23AM by khurrum_tajawal

Tutorial: Set Up a Secure Node.js Web Application

http://ift.tt/1KtOozZ

Submitted February 19, 2016 at 06:23AM by karldyyna

Code organization for routes

New to node, starting to work on substantial projects.Do you all organize your routing code into a sundae route module or do you create one module per route?Also I have some pretty significant complexity like passport authentication and emailing password resets inside my routing code. How should I structure this better?

Submitted February 19, 2016 at 01:55AM by HoneyBadger08

Looking for help deploying an application

Hello all,I'm looking for some assistance in the application deploying department. I am looking at developing something similar in function to a node.js drawing game found here: http://ift.tt/1PJSh2L have the zip file downloaded and am looking at using Amazon Web Services to host the app. (Open to other suggestions but very short on money)Currently I can get it to host a node.js sample code through the Elastic Beanstalk enviroment, but when i try and upload the drawing game, it doesn't like it and wont run it.Am I doing something wrong? I am just starting to get into this web stuff after knowing some coding for a while. Do I need to set up a server of some sorts? Why can't I get Elastic Beanstalk to deploy?Would really appreciate any help you can give!

Submitted February 19, 2016 at 02:49AM by Atyri

best tutorial for beginners

What's the canonical tutorial of choice for beginners? I come from a python web development background, and i'm tired of some of the limitations when it comes to concurrency. Google seems to lead to a couple outdated ones.

Submitted February 19, 2016 at 04:40AM by 89vision

Designing and Implementing Ranking Algorithm with Node.js and MongoDB

http://ift.tt/20Dgydy

Submitted February 18, 2016 at 10:01PM by Corath

node-swap: Universal exchange rate library for node.js

http://ift.tt/1oMsoGB

Submitted February 18, 2016 at 06:44PM by khurrumqureshi

400+ ASCII cows

http://ift.tt/20C9ONa

Submitted February 18, 2016 at 05:14PM by sindresorhus

Going to take a Javascript/Node training. What are my chances?

Hello Reddit,After graduating in CS and work in the network and hardware IT field, I want to move into Javascript or Node developer.I have read good books about Javascript, C#, Java, Swift, HTML, CSS before but not serious programming.If I do a two months intense training, Do you think I will have the chance to find job?Thanks you for the help.Location: NYC

Submitted February 18, 2016 at 05:15PM by pinklinux

node-lws: Lightweight WebSockets for Node.js

http://ift.tt/1SUgKGy

Submitted February 18, 2016 at 02:16PM by alexhultman

Simple and universal exchange rate library with support for multiple providers

http://ift.tt/1oMsoGB

Submitted February 18, 2016 at 01:50PM by khurrum_tajawal

Best way to feed .txt file into an array?

I have a .txt file without about 250k lines of English words. I'd like to be able to feed each line as a string into an array, so that I can take a base word such as "ever" and pick out the anagrams from the huge array.I've got a function that takes a target word and an array and gets the anagrams. However, I can't quite figure out how to load this local file into a huge array. Here's what I have so far:var fs = require('fs'); var readline = require('readline'); var stream = require('stream'); var instream = fs.createReadStream('/Users/myName/Documents/JavaScript/web/wordsEn.txt'); var outstream = new stream; var rl = readline.createInterface(instream, outstream); var arr = []; rl.on('line', function(line) { arr.push(line); }); rl.on('close', function() { return arr;} ); function alphabetize(word) { return word.split('').sort().join(''); } function anagrams(target, words) { var output = []; for(var i = 0; i < words.length; i++) { var word = words[i]; if(alphabetize(target) === alphabetize(word)) { output.push(word); } else continue; } return output; } But I get an error when I try to play with it in my terminal. Any suggestions as to how I can get this working?

Submitted February 18, 2016 at 08:12AM by ConfuciusBateman

Wednesday 17 February 2016

Coding Defined: Node.js CMS Frameworks

http://ift.tt/1Q1LZNg

Submitted February 18, 2016 at 07:40AM by shsh1

NodeJs Frameworks (MVC=No) - Welcome NodeII

http://ift.tt/21aSZfo

Submitted February 18, 2016 at 03:05AM by crh3675

Any advice on keeping API routes clean?

For example for any internal error thrown by mongo, I feel like I'm constantly doing a generic response of status 500 + a generic simple message. Any tips of this? Also do you guys separate out mongo calls a lot to make certain ones reusable? Also tips on file structure? Thanks for the advice :)

Submitted February 18, 2016 at 02:56AM by -proof

koa2-api-boilerplate - (feedback appreciated)

Hey guys, I just wrote a quick boilerplate project for building APIs with koa2.I find myself writing the same code over and over again and felt it was time to write something up that covered these essentials.Anything you guys feel would also be useful?

Submitted February 18, 2016 at 02:17AM by adrianObel

What's the best way to install the Cassandra database for node?

I'm thinking of using Cassandra as the database for a node website. My question is, how do I go about installing Cassandra? Does it involve a lot of command line stuff? And OS based installation? And, if so, how easy/difficult is that to port onto a server?

Submitted February 18, 2016 at 12:13AM by windyfish

Express.js and Typescript

http://ift.tt/1IV20fv

Submitted February 17, 2016 at 11:40PM by rjmacarthy

BuiltWithMeteor Weekly # February14th2016

http://ift.tt/1VojE3V

Submitted February 17, 2016 at 11:18PM by bogdancloud

[Beginner | Tutorial] Introduction to Node.js - Part 1: Webscrapping - Codingpen

http://ift.tt/20EUH5B

Submitted February 17, 2016 at 11:06PM by javascriptisfun

Open sourcing AquaJS | NodeJS & Microservices

http://ift.tt/1ROwp8V

Submitted February 17, 2016 at 10:26PM by grve25

Free Book for anyone interested in learning the Go Programming Language

http://ift.tt/1U86WHW

Submitted February 17, 2016 at 09:01PM by benjabs

Best practice for hosting multiple express webservices

A bit new to express and node, but from what I understand node will need to be restarted upon every code change. What's the best practice if I'm serving up multiple webservices (completely different web APIs not related to eachother) in production? If I need to make a code change on Web service A, I'll also need to take down Web service B? I guess one option is to run each web service on a different instance of node?I'm aware of nodemon and supervisor but those are still bringing down node and back up.. I'm guessing they're better in a dev environment?

Submitted February 17, 2016 at 05:55PM by FatAssOgre

[Tutorial] Using Passport and JSON Web Tokens to Secure RESTful API for Beginners

http://ift.tt/24aiZJn

Submitted February 17, 2016 at 04:11PM by SlatePeak

I use NVM in production. What is the easiest, "cleanest" way to make a "global" nvm setup?

TL;DR i have NVM on my server to update / switch between node versions, and i want it to be available to every user in a way, where i do not have to install a seperate node version per user.Is that possible somehow cleanly or is the cleanest setup having NVM for every user, but a seperate config / versions for everyone?The only answers i found were for deprecated versions and do not work anymore.

Submitted February 17, 2016 at 04:02PM by kinsi55

"The Best of Node Interactive"

http://ift.tt/1Syl7GE

Submitted February 17, 2016 at 03:09PM by wo1fgang

Search-index - The search engine that can run in the browser.

http://ift.tt/14Dbz75

Submitted February 17, 2016 at 01:35PM by eklem

Veria CMS, A lightweight blogging platform powered by Node.js

http://veriacms.com/

Submitted February 17, 2016 at 11:58AM by wo1fgang

Tuesday 16 February 2016

Coding Defined: File Upload in Nodejs using Dropzone.js

http://ift.tt/1TlL779

Submitted February 17, 2016 at 04:00AM by shsh1

Learn the key distinctions that contributed to the success of Node JS

http://ift.tt/1ZFqqbv

Submitted February 17, 2016 at 03:07AM by javascripttech

I told a friend I could finally understand callbacks in practice; in response, he sent me this meme.

http://ift.tt/1XwGlEm

Submitted February 17, 2016 at 02:26AM by KatamoriHUN

Do I want modules to re-initialize when clustering? (via cluster module for using up more cores)

when i cluster, do i want each cluster to reinitialize certain modules? for example, should each connect to apple push notification? at the top of app.js, i setup the connection, and thus it's called for each cluster.On an unreleated note, if i instantiate an object (that listens via eventEmitter) inside an init function, do i need to set the listener in emit, or can it be global? i.e. object.on('event', fn)

Submitted February 16, 2016 at 06:46PM by -proof

nodejs css question

I am able to display basic html text via nodejs. When I try to use CSS it doesn't seem to work. Are there prerequisites to using CSS with nodejs? If so what is the easiest way to get this going? (I am using express 4.0, node 4.0)

Submitted February 16, 2016 at 06:10PM by wenttothemarket2

Barebone MEAN stack

Hello, i put together a barebone MEAN stack simply because i was not content with what i found on the interwebs. Wether you like it or not, or if there are any bugs, please let me know. Any additional advices are welcome.http://ift.tt/247W7de

Submitted February 16, 2016 at 04:44PM by edeph

[Help] gulp-connect-php issues (Maybe general node issue?)

Async functions and ES6 modules

Hi,Just wondered if anyone knows when async functions and ES6 modules will be supported natively in Node. Can't seem to find any info.Thanks.

Submitted February 16, 2016 at 02:51PM by fens808

How to process geospatial data with nodejs and TURF.js

http://ift.tt/1PYJ4VF

Submitted February 16, 2016 at 01:16PM by moklick

Create fancy call site records for any function up in the stack for the logging purposes.

http://ift.tt/1VjkNJQ

Submitted February 16, 2016 at 11:44AM by inikulin

Setting up a TypeScript + Visual Studio Code development environment

http://ift.tt/1PBSxR8

Submitted February 16, 2016 at 11:13AM by ower89

Advice needed on building a desktop app with LAN connectivity

I am looking at building a desktop application that will allow other web clients on the same network (LAN) to connect and perform basic CRUD tasks. The app can be thought of as a LAN messaging app, accessible via the browser that also stores messages into the database and allows for searching messages by anyone on the LAN.Ideally, this can be easily setup with a simple website and a web server, db etc. however we are looking at having this app re-distributable to many of our remote offices. Not everyone will know how to set up node/database/web server etc. So packaging it in an easy to use desktop app seems like a easier step for deployment at various offices.I thinking of going with electron (instead of nw.js) and for the frontend, Im comfortable with angular.js.Is it possible to expose an electron app over the network, if so, how?What database can we use for this sort of app?

Submitted February 16, 2016 at 07:51AM by devchops

Monday 15 February 2016

New to NodeJS. How to use??

so i'm currently working on a JS-based project and i decided to use a solution involving NodeJS. let me explain the basic flow i need to accomplish:i need to send a HTTP request with the origins header changed.i managed to set up a node.js file that does that, with the correct response.however, i don't know how to use this node.js file in such a way as to be able to grab the output and use it.i used a makeshift method of outputting the response to a txt file and then reading it from there, only to realize that i still am unable to "run" the node.js file once the index.html file loads.i guess where i'm stuck is: how the hell do i run the nodejs file? i tried browserify but somehow when i used it, it doesn't work. i.e the response is wrong (the origins header was not sent so i got an notauthorized response).

Submitted February 16, 2016 at 12:37AM by needhelpwithnode

Help a noob with the node aspect of MEAN

I am following this guide * http://ift.tt/20WYAs7 everything works. However, when I add a "todo" the app crashes with:GET /api/todos/ 200 20.435 ms - 411 /home/me/sites/rhino/todo/node_modules/mongodb/lib/utils.js:98 process.nextTick(function() { throw err; }); TypeError: todos.find is not a function So to be clear, the app does indeed add a "todo" to the database but it crashes when it calls the todo.find function in core.js. Here is the code where it is failing. You can see in the pastebin code the line where todos.find is after the record is created.http://ift.tt/1Vi385e

Submitted February 16, 2016 at 12:08AM by TrulyExcellent

oLI'm shocked!!!oL

http://ift.tt/1KlZ2J0

Submitted February 15, 2016 at 11:54PM by aribiterspar8

Learn Node Streams in depth + connect to websockets

Hello, I am a polyglot how caught nodejs virus lately. I have been thru alot of tutorials, and have been using the meanjs generator to spin up sites and add stuff to them. Recently someone with a very fast realtime site if I knew Node streams in depth, also something about hooking them up to websockets.I realized I have been mostly using frameworks to do serve up REST or html/css/js pages. I have done a bit with sockets, like a simple chat server.How can I learn node streams in depth. Also anything about connecting node streams to websockets for fast realtime sites.I did come from a unix background before finding higher pay a win32 guy, but I still remember piping greps into text files etc. and I believe node builds on this concept of streams.thanks

Submitted February 15, 2016 at 11:23PM by cataquil

What level of tooling?

As a former .NET dev, i am used to heavy tooling and heavy IDE support. I am now dabling in Node and MEAN for a side project, and i amimpressed with the web devs who use sublime/atom/vi with such minimal overhead, but its also intimidating for me to not have the IDE support i am used to(like intellisense, debugging etc...)I am also using windows, which i have experienced firsthand is a pain in the ass for node development since the shell sucks and 99% of examples are in bash.so i found webstorm, which is the first time in a month that i feel like my node project just works, and im able to make reasonable progress. But i am concerned that I am bloatign my project by using webstorm. It seems to be adding a number of proprietary files and dependancies.My question is this, should i continue along in webstorm acknowledging that is is bloating my codebase or should i take the time to invest in a more lightweight solution where I will end up with a cleaner codebase and likely a deeper understanding of node and bash.help!

Submitted February 15, 2016 at 08:26PM by HoneyBadger08

Strapi: An opinionated framework built on Koa -- Has anyone used this in production? What are your experiences?

http://strapi.io

Submitted February 15, 2016 at 08:08PM by NotJustClarkKent

Promises vs Eventual Values

http://ift.tt/1QJJbD3

Submitted February 15, 2016 at 04:19PM by mkmoshe

What did JavaScript tell I/O?

Node now!

Submitted February 15, 2016 at 02:38PM by hackfall

jyI found my photos here! Help me! jy

http://ift.tt/1TlfPi4

Submitted February 15, 2016 at 02:24PM by t2yl7

Saxon-Node: Modern XSLT, XQuery and XPath in Node.js

http://ift.tt/1XrOr15

Submitted February 15, 2016 at 11:58AM by wo1fgang

Sunday 14 February 2016

Data processing inside or outside the route?

I'm developing an API which receives some data and then does a lot of processing on it.Each bit of the processing is separated into its own module.Should I call these modules inside the route (the API point which receives the data), or should I just hand the data (pre-processed) back to the main app and call the processing modules there?I'm worried if I do the processing in the route, it will delay returning a 200 response, and I'm worried if I do the processing in the main app, it might cause performance issues...?Thank you for your advice.

Submitted February 15, 2016 at 07:15AM by MEAN_questions

Can't configure Apache and Node to play nice

This may not be the correct place to post this but any help would be appreciated.I have a node app that works perfectly locally using the following directory structure:myapp/ app/ models/ routes.js config/ node_modules/ views/ package.json server.js I can load this app using http://localhost:8080 and all my routes work as expected. Example:app.get('/', function(req, res) { res.render('index.ejs'); }); app.get('/login', function(req, res) { res.render('login.ejs', { message: req.flash('loginMessage') }); }); I'm trying to deploy it to a DigitalOcean droplet that is already configured for LAMP. My directory structure is like this:var/ www/ html/ other HTML and JS apps/ myapp/ ... I have node up and running on the server. Loading either myurl.com:8080 or http://ift.tt/1REr6c2 renders the app landing page. However, all my of requests do not exist/404. For example, the /login request goes to myapp.com/login and 404's. I believe I may need to set up a ProxyPass in Apache but I can't seem to get it correct. I tried:ProxyPass /myapp/ http://localhost:8080/ which no longer resolves http://ift.tt/1REr6c2. I've tried a bunch of combinations with and without the /s but nothing seems to work.Any suggestions? Am I going down the wrong path? Thanks!

Submitted February 15, 2016 at 04:48AM by cmartin616

SyntaxError: Unexpected end of input

Hi , I am a begineer in node js , I have been developing a small project on password protection. I am getting unexpected end of input error after i gave the arg values Link to my code (http://ift.tt/1REr4Rn) Link to error (http://ift.tt/213HhC8)

Submitted February 15, 2016 at 04:50AM by adarshjayakumar

Help with routes for a newb

I'm using node, express, mysql, and handlebars to set up a simple REST API. My API calls all work (/api/accounts, /api/accounts/:id, etc.). How do I set it up so that I can see the list of accounts when I visit localhost:3000/accounts?Code can be found at: http://ift.tt/1RD0pob in advance.

Submitted February 14, 2016 at 06:11PM by learnUtheweb4muchwin

How do I find and prepare for a junior Node job?

I'm a recent C.S college graduate with IT experience but no coding-related job experience. I would like to focus on primarily back-end web development with Node. I understand HTML, CSS, and have read and watch some Javascriot books/videos.The problem with Node is that almost all Node jobs are either Senior Software Engineer positions, or they seek developers with 2-4 years of prior Node experience.How should I approach this or there are not Junior Node jobs?My Location: NYC

Submitted February 14, 2016 at 05:41PM by grappon

DeepStream.io : A Scalable Server for Realtime Web Apps

http://ift.tt/1KgiiaI

Submitted February 14, 2016 at 05:53PM by skini26

Any free cool nodejs web app tutorials out there?

I am looking for some really cool NodeJS based tutorials apart from the typical todo lost apps. No angularjs. ExpressJS based tutorials.Examples of tutorials I'd love: 1. Hacker news 2. Reddit 3. Stock market portfolio tracking Etc

Submitted February 14, 2016 at 05:34PM by Satonamo

To promise or to callback? That is the question...

http://ift.tt/1QAHZPR

Submitted February 14, 2016 at 04:25PM by loigiani

Small joke project I made in a weekend, used node-canvas to generate image - Repo in first comment

http://ift.tt/1Qfjiyo

Submitted February 14, 2016 at 02:38PM by Lampad1na

CLI-Search web-s v1.0

http://ift.tt/1ocHc0L

Submitted February 14, 2016 at 01:18PM by mstruebing

LvImportant SEX Dating!Lv

http://ift.tt/1KiE0ea

Submitted February 14, 2016 at 12:35PM by khaaveren4

Saturday 13 February 2016

REST API: using native mongo driver, how do you validate data? Also do you separate routes completely?

1) I'm using native mongodb driver as i was told it's more efficient than mongoose. with that said, do you usually validate all expected data in the request? I'd assume so. how thorough are you with it? any examples?2) we have this weird setup where we have one generic route where you provide the collection name in the request and the CRUD action is applied there. Is this.. ok? Do you usually separate routes out for different collections and have some logic reproduced? I imagine it makes sense to separate out my routes more since for example: deletes for one may have further requirements than a deletes for another.

Submitted February 14, 2016 at 12:28AM by -proof

yGO to mey

http://ift.tt/20vyCXb

Submitted February 13, 2016 at 10:47PM by dgrnarrow6

Using postgres with passport?

Does anyone have a link to a decent tutorial for using node-pg with passport? There seems to be no documentation whatsoever on the web for this and everything for passport is based on mongo - which I do not want to use.Anyone have any good ideas?

Submitted February 13, 2016 at 10:16PM by lawstudent2

Node amqp - a module for easy amqp comunication

http://ift.tt/1Qev6kq

Submitted February 13, 2016 at 09:34PM by 720kb

OMY wife's titsO

http://ift.tt/20RiTHa

Submitted February 13, 2016 at 08:54PM by poofwallazam3

How did you install node.js and nvm?

I've been trying to install node using homebrew, which is 100% unsupported, I got it working to the point where I could use it in terminal but upon terminal close, I could not get it to work again. I've seen a mix of you can and you shouldn't use homebrew for node.js and nvm. How did you guys install node.js and nvm to use it seemlessly when there are upgrades to node.js and nvm/npm?I use homebrew for my Ruby on Rails projects. The instruction for http://ift.tt/PqGVhG are slightly confusing and this is the way I've installed node.js using homebrew these instructionsAny help is appreciated. Thanks!edit: Im on OSX Yosemite

Submitted February 13, 2016 at 08:13PM by mf_dk43

l9NEW SEXl9

http://ift.tt/1R11tjq

Submitted February 13, 2016 at 05:10PM by eaw2706

Witchy Jewelry Home - Cor Obscura

http://ift.tt/1nu0Uor

Submitted February 13, 2016 at 02:22PM by cinderellawucru

GraphQL Documentation Checker - Find missing descriptions in your schema

http://ift.tt/1QykBmf find any missing documentation in your GraphQL API using introspection. Performs inspections remotely, without any need to access code.I recently began learning and using GraphQL and have been loving it, especially the way that it's self-documenting. However I found myself forgetting to fill out description fields here and there. So to combat this I've written graphql-doc-check. It will query your GraphQL API and let you know of any missing "documentation" (currently just descriptions).I'm always open to collaborators so if you'd like to help out that'd be great :)

Submitted February 13, 2016 at 12:22PM by JordanCallumA

nodejs one time URLs?

Is it possible to have nodejs generate a one time URL? I took a cursory look around and don't see anything specifically addressing this.

Submitted February 13, 2016 at 12:08PM by wenttothemarket2

Socket.io Help

Hello everyone, I'm currently busy with a website that uses socket.io. It is almost working, I just have a problem about when to call everything, right now I am calling it on a connection because I don't know how to do it so I anybody can help me please do. I can Skype etc

Submitted February 13, 2016 at 11:43AM by timgfx

npm install npm !

why install npm if i already have npm installed and if i dont have npm installed what is the use of this command? what does this command mean?

Submitted February 13, 2016 at 09:03AM by PabloPhuckingEscobar

Best way to learn Node after being starting straight with Express?

Hey all,As I have said in the title, I started straight into the express framework. I got my feet wet very quickly and made 2 apps that I am proud of, but I feel like it would be more beneficial for me to actually properly learn node (and javascript) properly to help me be a better developer. Iv'e already found some JS books that I am going to read up on but what do you guys recommend for learning node?Thanks!

Submitted February 13, 2016 at 08:34AM by mre12345

How to setup my own software CDN

Friday 12 February 2016

Deploying Node.js with Spinnaker

http://ift.tt/1V9tIxD

Submitted February 13, 2016 at 07:32AM by wo1fgang

Service to service communications, options?

I am looking for advice and suggestions on what people are using for inter service RPC communications. E.g. Requesting some data from another of your own services in the same application.Considering protobufjs for messages but also looking for transport options too.Any suggestions? We are a typescript shop too, so anything with decent d.ts support would be nice.

Submitted February 13, 2016 at 06:40AM by LoungeFlyZ

The Microservice Architecture Journey at Equinix | InterConnections

http://ift.tt/21032Tx

Submitted February 13, 2016 at 05:45AM by grve25

Looking for Mentoring

Sorry if this is the wrong place to post. I'm an experienced LAMP dev. I have an existing Node/Backbone/Mongo/Solr app that I want to fix a few things on and I would love to screenshare or if you're local meet up with someone a couple times a week for a few weeks. I'm happy to pay and work around your schedule.Things I'm interested in learning:A better dev environmentDRY for Mongo stuffWorking with sourcemapsOne on my calls is getting redirected ruining # of views in search enginesPM if you're interested. I'm in San Diego / Pacific Time if that helps.

Submitted February 13, 2016 at 04:53AM by step_hane

What is body parsing? Specifically co-body?

I haven't been able to locate a good description of what body parsing does. Anyone wanna briefly explain how it differs from this.request Koa provides?

Submitted February 13, 2016 at 01:10AM by djslakor

Socket.io get cookie PHPSESSID

Hi, I got cookie PHPSESSID using socket.io but it replaces characters like +, /, : etc. to some strange strings like %2F or %3A. How can I get rid of them and change it to normal characters?Using socket.handshake.headers.cookie.PHPSESSID:s%3A.3Q7BQ9lo7S%2F4yehQ1Iun7yGaGYW3hImEEAwUhTN1eCYAnd normal:s:.3Q7BQ9lo7S/4yehQ1Iun7yGaGYW3hImEEAwUhTN1eCYI tried to do it with replace function but I think it isn't good way to do it.

Submitted February 12, 2016 at 11:05PM by Gurlox

Trying to use a "RESTful" API from nodeJS app

Hi, I'm trying to make use of a RESTful API on a NodeJS app. I found that there are a few modules for this but I'm not sure which one to try out. Has anyone been in a similar situation?

Submitted February 12, 2016 at 10:32PM by edsc86

Concurrency Master - the lightweight Promise-based Node.js task scheduler

http://ift.tt/1mxnhYZ

Submitted February 12, 2016 at 08:30PM by the_legend_of_dave

Need something to countdown X minutes and notify how much time is left

Basically I have a setInterval that ends after 5 mins (user configurable) and then executes a function.I've been told setInterval can be unreliable and I also want to be able to tell the user that 50% / 75% of the time is up so they get a message "2 minutes remaining" or som sort.I'm looking into various options but having trouble finding a solution that will allow me to report on how much time is left

Submitted February 12, 2016 at 07:44PM by envinyater

Node NPM Install Process Out of Memory

I have Arduino Yun, which has a Linux partition. I have already run through the tutorial on expanding the Linux partition as described in this link. All went well and I now have the following setup when I run df in the root of a terminal sessionhttp://i.imgur.com/Y4NN0re.pngI have installed node and it is responding to termin requests but when I attempt to install packages usingnpm install twit I get the following responseFATAL ERROR: Evacuation Allocation failed - process out of memory Why do I get this error when it seems that I have plenty of space for the package on the rootfs partition? Any help is appreciated.

Submitted February 12, 2016 at 07:54PM by Tnwagn

How to Create a local json file with electron?

Hi, i'm playing around with electron, trying to make a simple node app. Since i would like to make notes to be saved and accessible via the app I thought a good solution is to save the notes title,body and date into a json file so I can retrieve it from the app. The question is, how can I create a file with electron and save it in a local folder inside my electron app, or how do u suggest to Chace variables like titles and texts to be accessible every time I start the app? Thanks :)

Submitted February 12, 2016 at 02:29PM by utopy

What is the best strategy for using node-postgres in multiuser CRUD application

I'm currently refactoring a LAPP (Linux+Apache+PHP+Postgres) CRUD application into a Node+Express+node-postgres one. Most of the business logic is made within the Postgres server (eg, user permissions, stored procedures, materialized views, etc). This application is a sort of a RESTful API. By "sort of", I mean an API that is not totally stateless, as it uses sessions to keep users names/passwords in the server during the whole duration of the session, which are then used in each access to the DB (a typical PHP pattern). The LAPP stack works well in a multiuser environment, and the postgres server is responsible for maintaining data integrity, even when conflicting commands are issued by different users simultaneously! The frontend is a JQuery+W2UI app that is supposed to work well with node (eg, it can define REST API endpoints that match routes in node for submit events).After reading a lot of documentation on using 'pg' (node-postgres) module in express (or any other RDBMS module, for that matter), I feel that most examples are tailored to a single DB user, even though they appear to be multiuser environments (like many blog or todo applications, where each 'user' actually uses an common/hidden login:password pair to commit data to the DB). The documentation of node-postgres is also not very clear about the issue I report below...As I'm quite new to node, I was able to setup a small server with express + sessions, but I stumbled in the DB interface, especially because of the intricacies of client pooling! My question is: what is the best strategy to implement a true multiuser CRUD application in node+express+node-postgres, using all the facilities offered by the PostgreSQL engine, like user credentials, permissions, etc?a) use a global pg instance and change the connectionString in pg.connect (with user:password stored in session) for each request (API endpoint).b) use a new pgClient for each request (with user:password stored in session) and avoid pg connection pooling altogether (eventually using connection pooling in the server, eg. pgbouncer or pgpool).c) use a local pg instance in a private thread (app clusters) for each authorized user, maintaining pg's connection poolingI feel that the last option is the least feasible, as each thread (run on a dedicated CPU) should use a single server, limiting the number of users logged to the number of CPUs. But what about the other two? I've seen a few posts demonstrating both patterns, but they are quite old and maybe not implementing the best practices of node and pg. They can also be moved to middleware that is "called" on reaching each of the API endpoitns.

Submitted February 12, 2016 at 02:32PM by sairum

g ATTENTION! On this site a lot-of people who want to find a sexy adventure! special for node

http://ift.tt/20sjl9y

Submitted February 12, 2016 at 01:12PM by fichasleli

The Node.js Foundation plans to incubate one of the community’s most popular packages

http://ift.tt/1QVGAWJ

Submitted February 12, 2016 at 10:18AM by Vittulino26

Thursday 11 February 2016

Slack Analytics & Search with Elasticsearch, Node.js and React

http://ift.tt/1ouC88g

Submitted February 12, 2016 at 04:43AM by wo1fgang

Does anyone know how to make columns of buttons with milligram?

In the example for their grids, I am unsure of how to use this feature in a way that will let me have columns of buttons. Do I simply stick the tags in between the column entries?

Submitted February 12, 2016 at 12:54AM by the_real_davenull

Should I use Passport or Grant for authentication on a Node.js app?

I want to allow users to log in using third party OAuth providers.I've always heard about http://passportjs.org/, but now http://ift.tt/118Nsvk seems so refreshing (from what I can see on their GH page).What would you use today?

Submitted February 11, 2016 at 11:41PM by andrerpena

UHelp me! Photo of my sister! How do I remove it?U

http://ift.tt/1KeHwGx

Submitted February 11, 2016 at 11:57PM by ap11237

Is there a small, simple CSS framework like Milligram, but does not require the use of external packages like the roboto font?

I am in need of a simple CSS framework, but I am using it in an environment that does not have access to the real world. Is there any other option, or is it possible to use milligram without these external deps?

Submitted February 11, 2016 at 10:00PM by the_real_davenull

Node.js PHP share session using Redis

Hi, im pretty new to node.js. I tried to share my php session with node.js using redis. Everything works fine but only in google chrome (on mozilla or opera it doesn't work). I'm using this code: http://ift.tt/1Tbv7Ey've been trying to do like everything with this code but it works only in chrome. I can't find on the internet why express needs a lot of modifications to session name. Can someone tell me? mozilla session key on redis: 2) "session:php:g8tl4mufjqgi0pk85su00gqv17" chrome: 1) "session:php:jEhF5RDI1EUPa-1ACbIAGEx2kIjcf7ea" Thanks :) (sorry for my English)

Submitted February 11, 2016 at 10:27PM by Gurlox

Inheriting Mongoose schemas

So I wanted to make a base Entity Schema, and other model entities would inherit from it. I did it, kinda, but then strange thing happened. Those are my schemas: AbstractEntitySchema -MessageSchema -UserSchema -RoomSchemaFile: http://ift.tt/20rrf2P in MongoDB, they are all saved in the same document store: 'entity models' not separate ones, like Messages, Users..Did I get what was supposed to happen, but not what I wanted, separate stores?If so I will just make a basic JSON/object as entity and append the appropriate properties for each entity. Or is there a better way?Thanks.

Submitted February 11, 2016 at 10:43PM by mihaelamj

NodeTogether

http://ift.tt/1Xmjjjm

Submitted February 11, 2016 at 10:20PM by steveklabnik1

K2I found your photos here! How do I remove itK2

http://ift.tt/1PFhDN0

Submitted February 11, 2016 at 06:37PM by scorpio11164

Continuous Delivery: pull code and restart server on successful build.

Has anyone found any tools for pulling code (from git) and restarting a server (node, nodemon, pm2, etc) triggered by a successful travis (for example) build. If not I will make one tomorrow, just dont want to go reinventing wheels...Cheers

Submitted February 11, 2016 at 04:55PM by wookoouk

Caco - Node.js generator based control flow that supports both callbacks and promises

http://ift.tt/1PFd98V

Submitted February 11, 2016 at 02:54PM by cshum

i ATTENTION! On this site a lot-of people who want to find a sexy adventure! i

http://ift.tt/20NXQp2

Submitted February 11, 2016 at 02:00PM by reacphodofti

How easy is it to fill the 500mb Mongolab gives you?

Hello there fellow developers! I am currently working on a small website. I'm currently using mongolab to host my documents and was wondering just how fast can that 500mb fill. I will only be hosting text data on there for making articles, such as a title, an image url and some article content. Nothing too crazy, but I don't want to invest a lot of money into this project from the get go. If there's any more information you guys would need, I'd be more than happy to give more detail.

Submitted February 11, 2016 at 01:57PM by rhynoboy2009

How to modify local authentication of passport.js?

I'm trying to change the local object from a Local Strategy of passport.js in a way below.Here you can download live example.Here is an example of userSchema from passport:var userSchema = mongoose.Schema({ local: { email: String, password: String } }); I want to modify that example into this:var userSchema = mongoose.Schema({ local: { id: String, user: { email: String, password: String } } }); And then I want to work with the user object on authentication, but I got this error: node_modules\bcrypt-nodejs\bCrypt.js:642 throw "Incorrect arguments";

Submitted February 11, 2016 at 12:27PM by GodOfTheMetal

spachcock 'routing with custom data'

u guys can use with websocket, socket.io, tcp data routing.that lib have a middleware option like express. (every option like express btw)on github

Submitted February 11, 2016 at 11:15AM by maiadota

Noob question: How am I supposed to use node on a server?

How am I supposed to upload node on a server and use it? Also how can I use mongodb on my server as replacement of MySQL if I need a simple database? Don't rage for those questions, I'm ignorant in node :)

Submitted February 11, 2016 at 10:11AM by utopy

Wednesday 10 February 2016

upserts for sqlite3 - a node module for when you're out of f***s to give

http://ift.tt/1POPgzn

Submitted February 11, 2016 at 07:05AM by bitmess

HTTP Response Splitting in Node.js – Root Cause Analysis

http://ift.tt/1nX54VX

Submitted February 11, 2016 at 04:44AM by wo1fgang

[Hiring] Denver, CO - Node.JS 6-Month Consultant, Possible CTH

Hi reddit,Great client of ours will be hiring up to 10 node consultants for work in Denver, CO (on-site preferred, partial remote okay). Qualifications include understanding of asynchronous communication, an in-depth understanding of the Node platform (including npm modules), solid Raw JavaScript skills, experience with RESTful API's, and familiarity with service oriented architecture.This is a fairly high-profile client. They pay well, and there is the possibility for contract-to-hire.If you're interested, please PM with your preferred contact infor and we can coordinate a time to chat.

Submitted February 11, 2016 at 12:35AM by BDenTech

Restify Model - A suprisingly useful model/collection adapter that builds routes and handles CRUD operations

http://ift.tt/20MrR8I

Submitted February 10, 2016 at 11:20PM by gunther-centralperk

Medium for storing files external to the server?

Probably a dumb question, but I'm not thinking of a way to phrase this correctly.I have an application I built. It's a CRUD service, and as it stands, an admin can upload a video file which adds a reference to their entry in the database and uploads the file to the server. The problem is that my server only has room for a few videos, and I need much more than that.What are some services with APIs where I can upload to the service and then just store the url in the database instead? What do I need to search for?

Submitted February 10, 2016 at 09:52PM by pomlife

klobb: an experimental server abstraction that focuses on simplicity and immutability that i started

source: http://ift.tt/1LhHWa1 central idea I'm experimenting with is once of abstraction.In Node, the root abstraction that we build on top of looks like this:http.createServer((req, res) => { // mutate res and req res.end(); }).listen(3000); You get mutable references req and res, you mutate them at the same time, and then you tell node to flush the response.With klobb, my goal is to wrap this with a functional abstraction to see if I can recreate some pleasure of modeling the request/response cycle in a functional language like Clojure:Requests and Responses are immutable (http://ift.tt/1NYi5HD) records.Handlers are functions Request -> ResponseMiddleware are higher-order functions Handler -> Handler.function serve(handler) { http.createServer((nreq, nres) => { // Map the Node request onto an immutable request const request = Request.fromNode(nreq); // All of your logic takes place here (handler) with immutable records const response = await handler(request); // Map the immutable response back on to the Node response Response.send(response, res); }).listen(3000); } For example, if you want to update a cookie, instead of calling res.cookies.set(key, val) (mutation), you would instead use basic data manipulation to return a response where the response.cookies (Map) has all of the cookies you want to send the client. In the outer middleware, klobb syncs your cookie map onto the underlying Node request (Set-Cookie headers).async function handler(request) { const counter = 1 + (Cookie.get('counter', request) || 0); return Response.ok(`You've viewed this page ${counter} times`) .tap(Cookie.set('counter', counter)) .tap(Cookie.set('session_id', 'xxxxxx')) .setHeader('X-Whatever', 'Some Value') } So far it seems the main challenge is user-experience. Immutable.js provides a rich API for manipulating data, but I'm definitely going to have to put thought into reducing boilerplate without too much cheating.Also, this is my first time using Babel. I had originally written klobb with http://ift.tt/1wKTmyL (simulating await with yield), but I stumbled upon http://ift.tt/23yH78e (another http tool) and rewrote klobb to use their Babel scaffolding, something I still struggle to understand and debug.Anyways, the project is really early and experimental, taking most of its inspiration from Clojure's ring abstraction which was so simple that it blew my mind back when I started working with it.I would love to hear any sort of feedback or ideas. I've been churning out middleware (http://ift.tt/1o3ZhhZ) to try to rapidly get to a place where I can tell where the pain points are.I've also got a weak hello-world app on heroku (http://ift.tt/1LhHWa5) that shows some of the middleware I've got working so far like serving static assets, cookies, and not-modified headers. nothin exciting yet.

Submitted February 10, 2016 at 08:56PM by danneu

Node Cluster vs. Nginx

Hey, I'm relative new in node just a couple of months working with it. But i'm planning to go live with one of my node apps (loopback as API and express for delivery of an angular frontend). My first intention was to use pm2 and its convienient cluster mode for my prod system. But after reading a couple of blogs and articels on going live with node, the general tenor was using nginx for delivering the 'static' frontend and HAproxy with forks of node instead of cluster mode.The arguments were pretty convincing but they where all referring to node versions ranging between 0.8.x - 0.12.x. Pointing out the lack of sendfile implementation as argument against delivering static files with node or lack of strategies for load balancing for using HAProxy.Now we have node 5.x and as far as I can tell these issues are fixed now. But I read recently here on this sub, advices like 'don't let node run on port 80'....So what's about it? Do these arguments still hold true? What would you recommend now, with node 5.x?

Submitted February 10, 2016 at 07:46PM by atx6sic6

WARNING!! On this site all the people want sex!

hello people!!!)

Submitted February 10, 2016 at 06:49PM by Hq0eR5xcd2

BuiltWithMeteor Weekly # February7th2016 - CodeBuddies.org

http://ift.tt/1SgE1Sx

Submitted February 10, 2016 at 05:55PM by bogdancloud

Replacement for nginx?

I've started working with node.js and I can't live without it. I have easily created a few specialized server applications that do what I want and I couldn't be happier!For a front end I've been using nginx + php so far. It works BUT ... If I could get rid of both ... and have everything run on JavaScript I could definitely save some system resources (I want to have a simple to deploy application on Raspberry pi)My php front end is rather simple, queries (redis/mysql), prints stuff (html and jquery), and delivers css files. Most of my content is dynamic.I'm new to this and I see dozens of frameworks and I can someone point me in the right direction? I'm interested in the following in order of importanceEasy\Simple to learnLow resource consumptionStandalone (I don't want to have to install 10 dependencies etc)

Submitted February 10, 2016 at 05:28PM by yan_imagined_it

Express on track to become a new incubation project of the Node.js Foundation

http://ift.tt/1SIwnAX

Submitted February 10, 2016 at 04:39PM by a0viedo

Products/Vendor/Price ORM

Using sequelize. we have Products and Vendors and we need to make a new relation VendorProduct that has price and date of that pricehow do you translate this relation to sequelize ORM?

Submitted February 10, 2016 at 04:44PM by dolchi21

Minimal Docker Containers for Node.js

http://ift.tt/20VIJGK

Submitted February 10, 2016 at 04:53PM by sogoruaiu

General routing module.

I was wondering if anyone is away of a generic routing module in node.js. The only routing modules I can find, are specifically used for webservers. (Express)I want to use the router for an other purpose (MQTT topic handling). And so I'm looking for a module that takes an string, parses it and handles it, while using variables used in the string.For example:router.register("/foo/(device)/(sensor)", function(device, sensor) { ... }); router.register("/bar/subcription/(id)", function(id) { ... }); in this case, a the string "/foo/alarm/door" should be handled by route 1, while "/bar/subscription/abc" is handled by route 2. In both cases, parts of the string are parsed and used as variables for the closure.If no such module exists, I'll try to built it myself. But I don't want to reinvent the wheel. :)Thanks in advance!EDIT: Typo

Submitted February 10, 2016 at 03:53PM by MrMaverick82

Is there any Node.js software to host multiple shared accounts on a single server, similar to WHM/cPanel?

I've used WHM to sell web hosting in the past, but I'd prefer to move away from the LAMP stack into the world of pure Javascript. Setting up a shared server in a MEAN stack seems like an obvious thing to do, but I haven't been able to find any examples of it--is all the software locked away under the control of proprietary companies, is it nonexistent, or have I just not been able to find it?

Submitted February 10, 2016 at 03:27PM by brentonstrine

Using nodejs with Apple's CloudKit server-to-server authentication: A snippet to get started

http://ift.tt/1Q73ebI

Submitted February 10, 2016 at 12:22PM by spllr

Easy Node.js GraphQL implementation, interfacing with PostgreSQL

http://ift.tt/1Q8tAAl

Submitted February 10, 2016 at 10:02AM by keithwhor

Tuesday 9 February 2016

In express.js routes, do you pass internal errors to next() or just send out a response?

Wondering what's the best practice and most efficient. For instance if within a route, if mongo pops an error up, such as trying to save the same ID value on a uniquely-indexed field, what should you do? Should you do: return next(err), or log + send a response back? Both? If I try boy I see this error that you can't set headers after they are sent. Thanks for the advice. Also this is a rest API for a mobile app, so no web view. And the errors are rare but I want to take precautionary measures

Submitted February 10, 2016 at 06:36AM by -proof

Sane tagging, releasing and shrink-wrapping in PayPal Checkout, and how it’s saved us more than once

http://ift.tt/1mrAm6h

Submitted February 10, 2016 at 06:14AM by Chun

Is there any open-source Node-based desktop application (for NW/Electron) that uses SQLite?

I tried to google how to connect SQLite to NodeJS (or NW.js, or Electron), but failed to find any working (compiled and ready-to-use) application that may be downloaded and tested immediately. So, is there any open-source project to look at?

Submitted February 10, 2016 at 04:51AM by DevSPCL

Nodal 0.7 Released! Conditional Joins, GraphQL + more. :)

http://ift.tt/1KEfNPv

Submitted February 10, 2016 at 02:32AM by keithwhor

Created my first "tiny" npm package.

http://ift.tt/1Q7WPmM

Submitted February 10, 2016 at 01:16AM by ABenis123

Pluggable DB example

I'm just learning node.js, starting with a chat server, like everyone :)I want to make my DB pluggable. I would like to be able to implement mongoldb as well as an embedded noSQL db. And a third option for testing, like just in-memory arrays...Therefore I don't want to couple my model objects with a particular schema/model implementation of mongo/mongoose and others.Are there any examples available to do that? I'm sure there are, but I did not find any yet.My (very much in progress) repo is at: http://ift.tt/1Q5SslZ.

Submitted February 09, 2016 at 08:55PM by mihaelamj

I think I finally created nice ActiveRecord for Node. Not production-, but at least already pet-project-ready.

Hi Reddit. I think I created something good and I hope on feedback from you :3I call it Active-Graph-Record as it works over graph DB and is an Active Record pattern implementation. I know I'm bad on namingFirst of all, github and npm.In brief:Actual ActiveRecord: create an instance, assign properties, call #save() and it's reflected.neo4j as DB (reasons below)no schemanice relations (even many-to-many-through out of the box)fully promise-based (well, actually, it's async/await-based, which is, actually, same)At glance- just a code sample. Some stuff like DB connection omitted. It's really simple too, I promise. It's just a short example.Well, why neo4j and why everything is looking slightly weird?I've started to look for something to work with any DB. Something simple, something that does not require a schema - so I can just pass object and it will be stored, I can query anything and I'll get it.I found nothing, so I started working over it. Actually, I did it first over Redis (even with relations), but then I understood I'm doing slightly crazy (due to too much Lua code auto-generation magic) so I started searching next.I had following criteria:string, number and bool native types (storing bools and numbers as strings in redis seemed like a bad idea)transactions (and ACID in general for consistency)no schema (schema is nice, but for pet project it's only slowing everything down, bringing its own pseudo-syntax and making you build whole infrastructure inside the app, all schema-based solutions smells nearly like yeoman - it's working, but it brings you bad feelings. Auto-generation from console is always less obvious than actual code)nice relations so I would not have to create them from scratchNeo4j was funny solution I've used for dumping some social data, and I tried to give it a chance. Pros werenice type system: strings, numbers, bools, and (!!!) typed arrays of every kindawesome relations engine (how about to simple syntax for query of relation depth of 5 to 8 edges? On SQL it would be slightly crazy)But there are consIt's actually slower. But not very much (1.8 times or so if properly configured), and it's linearly slower (not O(log n) or O(n * 2)), which is not very bad.No scaling - you are limited to single server if not paying for enterprise solutionSingle-threaded (critical for long transactions)I've worked a lot on it and now it has a lot of features. Being something like Rails's ActiveRecord is very far, but I have all kinds of relations, querying, transactions and handy API.However, I have a feeling it's a great solution for rather small projects. I've tried it on my own and I was happy, as it really brings comfort and peace of mind for me.It's definitely beta now, I'm pretty sure there are some bugs, so if you will create a PR, an issue for writing some tests or propose a functionality, it would be great. So, to conclude, one more time - http://ift.tt/1KDBeA1! :)

Submitted February 09, 2016 at 08:19PM by _jabher

Secure Password Hashing in Node with Argon2

http://ift.tt/1P419Ql

Submitted February 09, 2016 at 07:06PM by rdegges

February 2016 Security Release Summary

http://ift.tt/20TtEFC

Submitted February 09, 2016 at 05:55PM by a0viedo

A pastebin clone I wrote in Node. Trying to also make it into a blog framework.

http://ift.tt/1Q7cYc7

Submitted February 09, 2016 at 04:58PM by rusher81572

Creating paging with 2 mongoose collection

I wan't to do paging with 2 different mongodb collections like let's say I have some text on one collection and some pictures (or urls to those pictures) in another and I need to send 10 in total of those back to user, so if user makes api reguest like GET /api/feed/1 it sends first 10 images or texts sorted by date. So if user creates 3 texts first then 8 images it would send 2 texts and 8 images back. How do I combine those two collections to work like that? I could easily do this with limit if I would use only 1 collection but how about with 2? Sorry for bad explanation, I am very tired at the moment, hopefully you guys get what I want :)

Submitted February 09, 2016 at 05:02PM by Viped

Using Node.js to Build your Transport Layer [ Thunder Plains 2015 ]

https://www.youtube.com/watch?v=eNiufrICG-0

Submitted February 09, 2016 at 03:03PM by blazedd

Memory Leak Memories

http://ift.tt/1XfqFFm

Submitted February 09, 2016 at 11:59AM by wo1fgang

Start javascript-server on boot

Hey RedditorsI've created a simple application with node and Angular that I would like to launch on the boot of my Raspberry PI (running Raspbian). I've created a service that launches on startup. I know the service up and running because I can see it is launched successfully and still running. However, the server is not.When I launch the server manually withforever server.js it runs like a charm.Here is a piece of the service that I wrote to start the server.[Service] User=pi WorkingDirectory=/home/pi/Documents/ACA/buildwall/buildwall/server/ ExecStart=/usr/local/bin/forever start /home/pi/Documents/ACA/buildwall/buildwall/server/server.js I have no idea what's going on to be honest, however I don't think the script is the problem. The script seems alright because I kind of copied it from someone else's script that does work. I think I need a better understanding of how node works and why this does not work the way it should.

Submitted February 09, 2016 at 08:25AM by Liradon

Monday 8 February 2016

Node API app for microsoft Azure

Hi Reddit <3,I am trying to make JUST THE APIs for the web app, my buddy is dealing with the front end part using my APIs. We are using Microsoft Azure and I came across this :http://ift.tt/1ScJny6, I already have a basic app of my own and I don't know what exactly should I have in my api.json.I saw their app has TWO api.json. I don't know HOW MANY of them are we expected to make and which format (what EXACTLY do they want in there). Any tutorials out there to guide a fellow redditor how to construct api.json on own?LMK if I am doing something stupid!

Submitted February 09, 2016 at 04:37AM by rosedye

A tiny task scheduler for node.js

http://ift.tt/1PLfWRv

Submitted February 09, 2016 at 03:12AM by lucasmerencia

Freshly subscribed, need help.

Hi, after my website have been generated can I delete all .jade files?

Submitted February 09, 2016 at 01:07AM by GoaScientist

hapi & hapi-auth-cookie confusion

Hi there!I have an auth strategy set up using hapi 13.x.x and hapi-auth-cookie 3.1.x, but no matter what modes I try (besides false), none of the route-level auth configs seem to matter. For instance, if I make the strategy required, I can't doconfig: {auth: {mode: "try"}} in the route to disable it. (The docs say false is an acceptable value, but it actually isn't.)Anyone have insight or a working example?

Submitted February 09, 2016 at 12:42AM by swords-to-plowshares

browser-platform - lightweight browser and platform detection for client and server

http://ift.tt/1UYDTEU

Submitted February 08, 2016 at 09:37PM by aztracker1

How to res an html page in response to an ldap post request?

Currently I have a simple web server set up that handles ldap get and post requests. When a client contacts the web server they get sent an html login page with some front end angular. Upon entering their credentials an ldap post request is sent to my web server. The web server then authenticates the credentials and sends back a message saying that the credentials were correct.Instead of sending back a message saying that the credentials were correct I want to send them the home page html file. However with the code below the html file isn't opening and the text of the html file is being sent as a message.http://ift.tt/1Phz0p8

Submitted February 08, 2016 at 09:14PM by Adam_La_Mar

cluster-map: Abstracts execution of tasks in parallel using Node.js cluster.

http://ift.tt/1LbZIvg

Submitted February 08, 2016 at 07:50PM by kAf4mGoIgCKt

Getting started with mdb_v8 for post-mortem debugging of node.js applications

http://ift.tt/1KBpsGu

Submitted February 08, 2016 at 07:55PM by prettymuchbryce

Recommend good tutorials, books, articles on MEAN stack structure/architecture/scaffolding please!

I've been working with node/express for a while just serving static pages, and I'm very competent (less than expert, but not a novice) with JS in general. I've learned Mongo and Angular, but I am struggling to pull it all together. Specifically, I'm struggling to figure out best practices for architecture, especially with partitioning the Ms Vs and Cs to make calls to the backend from an Angular service. Can anyone recommend an up-to-date (Express 4, Angular 1) resource on this?

Submitted February 08, 2016 at 07:26PM by Oops_TryAgain

[Javascript] Promise me to keep your order

http://ift.tt/1Q5qjS7

Submitted February 08, 2016 at 06:58PM by zarrro

How Node.js handles HTTP connections under the microscope

http://ift.tt/1okW79v

Submitted February 08, 2016 at 07:21PM by davidsdias

I'm a front-end dev looking to get a node dev position. What do I need to know to get a job?

I've worked as a front-end dev for 3 years. I love programming, but hate the front-end. I'm pretty savvy with JS (can navigate callback hell, understand scopes, closures, deal with callback hell, write native JS), but I'm still building up my Node knowledge. What do I need to know to be hireable as a Node developer? I'm building an automatic Reddit poster using Raw.js (a Node wrapper for Reddit's API) and Express.

Submitted February 08, 2016 at 05:59PM by n00bermensch

Help with abstracting / refactoring project

I'd really like anyone with experience building projects in Node (more than just Express servers) to take a look through my project and let me know if there are better ways to refactor or abstract the source, or if I did a half-decent job in that regard.Still pretty new to Node, and I need practice approaching problems in a way that I always write reusable code. In this case, none of the code would be 'reusable', but it doesn't hurt to have a pretty abstraction or structure.This project is a simple command-line translation application. It's supposed to be very simple, and was built mainly to be a learning experience. There is still a lot for me to do as far as reorganizing different parts of the source and handling options.Find at github/eldino/terminal-translationClone from http://ift.tt/1mnOeyo

Submitted February 08, 2016 at 05:31PM by flyingleo

Bookshelf.js accessing multiple tables that are related

http://ift.tt/1K83Txq

Submitted February 08, 2016 at 05:40PM by laraveling

How to trigger time-based events

Hey guys,I'm just building a webapp (with sailsJS), which requires to trigger events after a certain amount of time and I can't come up with a good idea. Right now I'm thinking about using setTimeout(), but the delays would be super long (could be up to several hours) and I don't think the function is supposed to handle such scenarios. Another idea I had was to use setInterval() and check the time every minute or so, but wouldn't that be the same as my first idea? Is there some kind of code that allows me to trigger a function at a specific date or time?Anyway, does anyone have experience with problems like that? I would love to hear what you came up with!

Submitted February 08, 2016 at 04:33PM by bobbythecreator

BlueOak Server: Framework for building REST APIs with Express and Swagger

http://ift.tt/1ocSjae

Submitted February 08, 2016 at 03:16PM by voltron348

Fluent sql lib, simple SQL queries

http://ift.tt/1SZrH7X

Submitted February 08, 2016 at 02:08PM by the_jaxx

Help setting config.json

im in university and have as a project to continue an app from last year. Im trying to launch the nodejs app but got this error:ScanOID started events.js:72 throw er; // Unhandled 'error' event ^ Error: connect ECONNREFUSED at errnoException (net.js:901:11) at Object.afterConnect [as oncomplete] (net.js:892:19) I'm trying to run it on local host, what should i change on the configuration ? config.json:{ "config" : { "port" : 8080, "app" : "ScanOID", "urldev" : "127.0.0.1:5433", "secret" : "scanoid" }, "schedule" : { "statDay" : 1, "statHour" : 0, "statMin" : 0, "statSec" : 0, "productDay" : 1, "productHour" : 1, "productMin" : 0, "productSec" : 0 }, "email" : { "mail_address" : "*@gmail.com", "mail_password" : "***" }, "misc" : { "numberClientPostPrice" : 1, "timeConnexion" : 5400, "timeEmail" : 259200, "sizeRandomEmail" : 128, "sizeRandomPassword" : 16, "nominatimURL" : "nominatim.openstreetmap.org" }, "redis" : { "db_port" : 6379, "db_host" : "127.0.0.1", "db_app" : "scanoid", "db_uapp" : "userscanoid", "db_pass" : "***" }, "stats" : [ "product_research", "connection", "registration", "price_entry" ], "postgresql" : { "db_host" : "127.0.0.1", "db_name" : "postgres", "db_port" : 5433, "db_user" : "postgres", "db_pass" : "azerty", "pool_min" : 10, "pool_max" : 10, "pool_idleTimeoutMillis" : 30000, "pool_log" : false }, "web" : { "title" : "ScanOID", "authors" : [ "*" ], "keywords" : [ "collaboratif", "produit", "magasin", "moins chere" ], "content_type" : "text/html", "charset" : "UTF-8" }, "admin" : { "files" : [ { "name" : "config.json", "path" : "./" }, { "name" : "package.json", "path" : "./" } ], "administrators" : [ "muenier.elliott@gmail.com", "steph.meresse@gmail.com", "application.scanoid@gmail.com" ] }, "stringError" : { "serverError" : "le serveur à rencontré une erreur", "redisError" : "la base de données redis a renvoyé une erreur", "postgresqlError" : "la base de données postgreSQL a renvoyé une erreur", "nodemailerError" : "un email n'a pas pu être envoyé à votre adresse", "noAuthorization" : "vous ne pouvez pas acceder à ce service" }, }

Submitted February 08, 2016 at 12:20PM by SerkSerk