Sunday, 31 January 2016
Advice on "testing" API?
Hello,I've been asked to test a backend API to be ready for a production setting.. Any recommendations on how and what to test? I was thinking I could use mocha and chai and test against the http end points and validate responses..make sure invalid tokens don't work, etc. any thoughts? Just curious about industry standards for backend testing
Submitted February 01, 2016 at 02:57AM by -proof
Submitted February 01, 2016 at 02:57AM by -proof
Easily set node modules as Webpack "externals"
http://ift.tt/1JNcKUY
Submitted January 31, 2016 at 09:53PM by liady769
Submitted January 31, 2016 at 09:53PM by liady769
NodeJS NodeII Design Pattern - no more MVC!
I created this design pattern concept http://ift.tt/21aSZfo a while ago. I received mixed feedback so I wanted to push some more updates based on the feedback. Comments welcome.
Submitted January 31, 2016 at 09:31PM by crh3675
Submitted January 31, 2016 at 09:31PM by crh3675
Looking for Express tutorial
I'm trying to learn how to build a node web app with Express and am having trouble finding a comprehensive tutorial. I want something similar to Michael Hartl's Rails tutorial. Does anyone have a suggestion for me?
Submitted January 31, 2016 at 08:50PM by osheehan95
Submitted January 31, 2016 at 08:50PM by osheehan95
Can't use ES6 modules in Node v5 ?
I'm working on node app (with node v5.4 installed) and can't use ES6 modules.I have the following error when I run my app:import express from 'express'; ^^^^^^ SyntaxError: Unexpected token import What's wrong ? I thought that Node v4+ supports most ES6 features (well, at least ES6 modules since they are very popular and useful)
Submitted January 31, 2016 at 06:54PM by skini26
Submitted January 31, 2016 at 06:54PM by skini26
Express Controller Unit Testing Question
Hey everybody,I have a function in my controller that I want to test but I'm not sure how to go about doing it.CONTEXT: My application has an api which goes through a router and currently, the post for /api/object/create is mapped to the objectController.create() function withrouter.post(/api/object/create,objectController.create) My controller looks like this: exports.create = function(req,res){ //User will submit an object for creation with req.body.name and req.body.longName var Objects = models.Object; console.log(req.body); Objects.create( {number:req.body.number, name: req.body.name, longName: req.body.longName}) .then(function(result){ res.send(result); }) .catch(function(err){ errorController.databaseError(err,req,res); }) } Now how do I create unit tests for this? I've followed this tutorial which tells me to use Sinon.spy to observe the res.send() and ensure it gets called but that does not work. http://ift.tt/1UAsjjn have seen a lot of tutorials calling for me to test by having the server running and actually sending POST's to the api, but that seems like End-to-end testing and is not what I'm looking for.Any help would be much appreciated :) Thanks!
Submitted January 31, 2016 at 06:28PM by TLI5
Submitted January 31, 2016 at 06:28PM by TLI5
Data driven NodeJS tutorials (Part 1)
http://ift.tt/1nW1jAh
Submitted January 31, 2016 at 03:06PM by philhudson91
Submitted January 31, 2016 at 03:06PM by philhudson91
Saturday, 30 January 2016
How to pick up node JS without knowing JavaScript?
I joined a team were I will be a backend Node.js developer. Unfortunately, my mind is wired all with C++, Java, C#_like languages, and almost no exposure to JavaScript.Now there is a whole code base that I am not even familiar with the syntax, terminology, etc! Like, I don't know why in some files (classes??) I seesearch: function search(req, res) { ... } and in another file I seeSomeService.search = function search(context, someID) { ... } I need some neat explanation on how we write classes, where are private and public members, etc. if there are any of such concepts. And anything else that I cannot think of with the "synchronous" language mindset.I have really tried to do my homework and Googled for tutorials on Node.js, but they assume you are familiar with JavaScript, or they go too deep into installing, npm, Express, etc. I really don't have the time to go through JavaScript now :( The project is running and I'm already in!!I want to learn from the code that we already have. But for that, I need to know the very basics, and the syntax, and to fix my mindset!How to do that??? Any magical guide or something? I really appreciate your help and I know you may hate me because I want to learn it the easy way!tl;dr: Coming from OO with no js background, need to know the very basic concepts of Node programmingEdit: grammar
Submitted January 31, 2016 at 02:48AM by trynodecatch
Submitted January 31, 2016 at 02:48AM by trynodecatch
Socket.io Help v2.0
Alrighty, here I am again asking for help. I now understand SocketIO a LOT better. But I have a problem again. When users hit the create button an li should be added to the HTML and removed after 15 minutes. In my index.js file I can't do this because I can't use document, and I don't know how I can do all of this and save it (So that I can refresh the page and the li's are there and are gone only after 15 minutes later). I have tried a lot already, like sending back 2 variables consisting of a title and a URL to the client and adding those in the LI, but that didn't work (probably my fault since i dont know how to properly send multiple variables in one emit, havent found good tutorials on that online) So if somebody knows how i can accomplish this please tell me. If you have any questions just ask :). I am going to bed now so I will be able to reply to all of you tomorrow! Good night :)
Submitted January 31, 2016 at 12:15AM by timgfx
Submitted January 31, 2016 at 12:15AM by timgfx
Authentication in Node.js using Hapi.js
http://ift.tt/1m5MgT3
Submitted January 30, 2016 at 10:38PM by Wagnva
Submitted January 30, 2016 at 10:38PM by Wagnva
ThIs Site Likely Containz Sexually Explicit Photoos Of Someoone You Know! my satd
http://ift.tt/1OXTlPW
Submitted January 30, 2016 at 10:33PM by chrisaruses
Submitted January 30, 2016 at 10:33PM by chrisaruses
Free Automatic SSL certificates for Node made easy.
http://ift.tt/1Q1ZPeq
Submitted January 30, 2016 at 09:53PM by Piercey4
Submitted January 30, 2016 at 09:53PM by Piercey4
Socket.IO Beginner help
Hello guys, I am new to Socket.io and have a problem. I think it's solveable rather easily but I have been struggling with fixing it for the past hour... This is the code: var express = require('express'); var app = express(); var http = require('http').Server(app); var io = require('socket.io')(http);app.use(express.static(__dirname + '/www.csgolobby.com')); app.get('/', function(req, res){ res.sendFile(__dirname + '/index.html'); }); io.on('connection', function(socket){ console.log('a user connected'); }); http.listen(3000, function(){ console.log('listening on *:3000'); }); The problem I am having is that I don't get the message "a user connected" when I connect. I have gotten that part of the code from the Chat Tutorial on Socket.io. I have changed the vars provided there so I could use all my css/js files from my already existing website in the folder http://ift.tt/1JQ2tr7 is appreciated a lot! _^
Submitted January 30, 2016 at 08:27PM by timgfx
Submitted January 30, 2016 at 08:27PM by timgfx
Optimize Node.js code execution and detect memory leaks using ironNode
http://ift.tt/1m5oZ3D
Submitted January 30, 2016 at 08:15PM by s--a
Submitted January 30, 2016 at 08:15PM by s--a
Debugging Node.js in Chrome DevTools
http://ift.tt/1PosH4q
Submitted January 30, 2016 at 06:55PM by mattdesl
Submitted January 30, 2016 at 06:55PM by mattdesl
If you are using the PostgreSQL or MySQL Sails adapters you can upgrade to the latest version for a pretty large performance boost! Enjoy
http://ift.tt/1SQqqkM
Submitted January 30, 2016 at 05:39PM by tailot
Submitted January 30, 2016 at 05:39PM by tailot
Buttercup - open-source password manager made with Node + Electron
http://ift.tt/23zTYqF
Submitted January 30, 2016 at 01:54PM by perry_mitchell
Submitted January 30, 2016 at 01:54PM by perry_mitchell
My Pixijs and Socket.IO test app
Just click or tap http://ift.tt/20dq1xt
Submitted January 30, 2016 at 01:28PM by STPie
Submitted January 30, 2016 at 01:28PM by STPie
My comment which provided a fairly damning clarity on how the ChakraCore PR is an embrace, extend, extinguish maneuver by Microsoft was censored, and I was locked out of the thread
http://ift.tt/1Q0DGxc even though I had copy pasted it to the clipboard knowing it would be censored, I accidentally put something else on my clipboard so I don't have the text anymore. It was a very damning explanation of why the PR is quite suspicious and how the fundamental business interests at Microsoft are at odds with open software.But one key point: one of the most enthusiastic commenters on the PR, a 'MrRio', a.k.a. James Hall, is the founder and director of a marketing agency in Britain that has Microsoft as a core client (see their website, his LinkedIn). He came into the thread and urged that the PR be quickly merged. His prose implied that he actually believes the PR to represent both an embrace and extend maneuver by Microsoft. From his exact comments:It literally shims the same API rather than extending it [embrace]...Just land it and see what gives. It's adding so many features [extend] and doesn't break anything else. It can be refined once in and think about different engines later [extinguish].One of the other points I made is that MS in the last couple of years has engaged in other underhanded behavior related to open standards that oppose their business monopolies. There was a fraudulent JavaScript demo and article faking a data leak from WebGL that had mostly taken over the Wikipedia article for WebGL, which coincidentally that FUD was also created by technology-oriented marketing firm from Britain.Anyway Rod Vagg is core to NodeSoure, and Microsoft is a key partner for their company, which means that he is absolutely biased in this case, which is why he repeatedly censored my comment, even though a few people immediately suggested that I had made a valid point.But my prose in that comment was probably the best I have written, which is another reason I think the comment was deleted so quickly.
Submitted January 30, 2016 at 09:53AM by runvnc
Submitted January 30, 2016 at 09:53AM by runvnc
css-declaration-sorter: sorts CSS declarations for cleaner and smaller CSS code
http://ift.tt/1NpJuOK
Submitted January 30, 2016 at 09:08AM by Siilwyn
Submitted January 30, 2016 at 09:08AM by Siilwyn
Friday, 29 January 2016
IBM is applying to move Express to the Node.js Foundation
http://ift.tt/1UufAyG
Submitted January 30, 2016 at 07:36AM by wo1fgang
Submitted January 30, 2016 at 07:36AM by wo1fgang
Best way to deploy node.js with mongodb app online?
Hey everyone!,I have just finished my first app and I really want to put it online. Static websites/PHP content has been relatively easy to put online but node.js apps seem very complicated to deploy.I have a few questions about deploying node.js apps with mongodb:What is the best service provider of node.js apps? (Taking into consideration of cost, ease of development and stability, speed)What is the best way to deploy mongodb with node.js? Is it by using an external provider like mongoLab or is there a way to keep your mongodb database on the same server as your node.js app?I am asking the second question because I have been using the mongoLab free mode for my apps and they seem incredibly slow.. and I dont really want to pay $15 every month just for mongodb storage.
Submitted January 30, 2016 at 02:33AM by mre12345
Submitted January 30, 2016 at 02:33AM by mre12345
GitHub - nskazki/human2bytes: h2b('1K') → 1024
http://ift.tt/1TsmwOh
Submitted January 29, 2016 at 10:08PM by nskazki
Submitted January 29, 2016 at 10:08PM by nskazki
Dynamic Meta Tag Help
What is the best way to output dynamic meta tags inside my on an express app? I don't want to put a bunch of conditions in my view and don't know how to abstract it out.
Submitted January 29, 2016 at 08:34PM by bliitzkriegx
Submitted January 29, 2016 at 08:34PM by bliitzkriegx
rstacruz/pnpm: Performant npm
http://ift.tt/23vCD27
Submitted January 29, 2016 at 07:45PM by NodeMasterPro
Submitted January 29, 2016 at 07:45PM by NodeMasterPro
Deploying Parse server to Google App Engine
http://ift.tt/1nth8xT
Submitted January 29, 2016 at 06:10PM by justinblat
Submitted January 29, 2016 at 06:10PM by justinblat
Socket.io authorization
Hi!I'm going to use OAuth2 to secure my API as well as with my socket.io API. I've looked into it and it seems fairly straightforward (there's an authorization hook for socket.io).My only question is what would be a nice method to allow non-authenticated users to still receive events rather than simply disallowing them access. Authenticated users should be able to receive events as well as emit them. My first thought would be to attach a flag to the socket session 'read-only' or something. Any suggestions?The context is a public chat room, where logged-in users can actually send messages and anonymous users can still read.Thanks
Submitted January 29, 2016 at 04:17PM by Witless-One
Submitted January 29, 2016 at 04:17PM by Witless-One
Node.js Stream Handbook: How to write Node programs with Streams
http://ift.tt/TNpydO
Submitted January 29, 2016 at 02:20PM by laggingreflex
Submitted January 29, 2016 at 02:20PM by laggingreflex
create-index program can now recursively detect safe index files and update them (program used to export contents of a directory using ES6 "export"
http://ift.tt/1Qx1UBT
Submitted January 29, 2016 at 01:10PM by kAf4mGoIgCKt
Submitted January 29, 2016 at 01:10PM by kAf4mGoIgCKt
I'm working on a open-source IoC container for JavaScript apps and I need your feedback!
http://ift.tt/1PErDFb
Submitted January 29, 2016 at 10:46AM by ower89
Submitted January 29, 2016 at 10:46AM by ower89
Thursday, 28 January 2016
Property Validator: ✅Easy property validation for JavaScript, Node and Express.
http://ift.tt/1lZBEVV
Submitted January 29, 2016 at 07:35AM by nettofarah
Submitted January 29, 2016 at 07:35AM by nettofarah
Libraries for secure connections between microservices?
So I've been wondering -- are there any libraries out there that specialize in creating secure connections between different microservices? Say that you've got a microservice wrapper around a database, for instance. You want to make sure that the only thing that can make calls to/from it is your web app microservice. Is there anything to handle that now?
Submitted January 29, 2016 at 07:15AM by jon_stout
Submitted January 29, 2016 at 07:15AM by jon_stout
Node 4.2.6 windows installer not downloading?
Does anyone have a mirror I can download? I've been trying to download the file for like half an hour now. :/
Submitted January 29, 2016 at 03:30AM by sparkyman215
Submitted January 29, 2016 at 03:30AM by sparkyman215
Parse is dead. Parse Server open source
http://ift.tt/1UtPRX1
Submitted January 28, 2016 at 11:09PM by yograterol
Submitted January 28, 2016 at 11:09PM by yograterol
Multi test framework runner - server side?
Is there a test runner for NodeJs which runs server side tests written in an 'x' framework like how Karma can be configured for client side tests? Or perhaps a process that can allow server side tests to work with Karma?
Submitted January 28, 2016 at 09:38PM by aragorn_ranger
Submitted January 28, 2016 at 09:38PM by aragorn_ranger
BCrypt: Hash Passwords Correctly
http://ift.tt/1PlJhln
Submitted January 28, 2016 at 09:12PM by Davismj
Submitted January 28, 2016 at 09:12PM by Davismj
Biggest Site Online! Find Your Girls to night! my tosd
http://ift.tt/1QvB10Y
Submitted January 28, 2016 at 07:31PM by amasacqui
Submitted January 28, 2016 at 07:31PM by amasacqui
Due to threat of a lawsuit, Jade is being forced to rename. It will soon be called "Pug"
http://ift.tt/22kVSef
Submitted January 28, 2016 at 06:11PM by WigglePigeon
Submitted January 28, 2016 at 06:11PM by WigglePigeon
bash-exec: Like spawn('bash', [ '-c', cmd ]), but with better error handling.
http://ift.tt/1WPNBe5
Submitted January 28, 2016 at 04:03PM by nskazki
Submitted January 28, 2016 at 04:03PM by nskazki
There's an Alfred App Workflow for searching NPM packages, here's a gif showcasing it
http://ift.tt/1lWWcyn
Submitted January 28, 2016 at 03:30PM by umaar
Submitted January 28, 2016 at 03:30PM by umaar
Exporting a Request cookie jar?
The request README talks about importing a cookie jar from a JSON file through the use of tough-cookie, but it provides no examples on how to take a cookie jar and export it to a JSON file.Does anyone know how I might accomplish this to achieve persistency?
Submitted January 28, 2016 at 02:52PM by aliasxneo
Submitted January 28, 2016 at 02:52PM by aliasxneo
Problems using [forever] to keep my node script running.
Hi Guys,I could really use some help, cause I'm pulling my hair ... I created a small node.js script that I start with forever. Unfortunately, this script stops running every few days without any errors (noting odd in my logs), and doesn't restart.I've got 3 other node.js scripts running for over 100 days now, so forever does it's job perfect these scripts (it even restarts when the scripts fail.) Unfortunately I can't seem to figure out why the particular script stops, and why it doesn't restart. Is there a good way to debug this?Thanks in advance!
Submitted January 28, 2016 at 02:56PM by MrMaverick82
Submitted January 28, 2016 at 02:56PM by MrMaverick82
Chimneypot - a lightweight Node.js GitHub hook listener
http://ift.tt/1JI2Eoh
Submitted January 28, 2016 at 01:54PM by jkmonger
Submitted January 28, 2016 at 01:54PM by jkmonger
Seneca, A Microservices framework for Node.js
http://ift.tt/1VulgJ0
Submitted January 28, 2016 at 01:14PM by wo1fgang
Submitted January 28, 2016 at 01:14PM by wo1fgang
Wednesday, 27 January 2016
Using ES7 with ExpressJS ?
I recently tried the new Async Await feature and was amazed about how it transformed my old unreadable code in something really beautiful.I used it in a simple Node.js script and used bluebird.promisifyAll(someOldCallbackBasedModule) to transform all my callback based libraries and module in Promises so I could use await on them.Now my question is that if it is possible to use this in Express ? I know there is Koa2 that has it, but I already have an express based backend and want for example to use async await instead of promise.then() in some of my middlewares and keep my other old middlewares as they are.Is this doable ?
Submitted January 28, 2016 at 04:57AM by skini26
Submitted January 28, 2016 at 04:57AM by skini26
How do you find Packages?
When you need a package to do something, how do you go about finding one that meets your needs?Often I find that my initial search wasn't that great and half way through implementing it by hand, I run into a StackOverflow post that causally mentions to use packageX that does everything I need.
Submitted January 27, 2016 at 09:25PM by __woah_man
Submitted January 27, 2016 at 09:25PM by __woah_man
Esrol.js
Esrol 1.0 is out there and I'll love to receive some feedback : )http://ift.tt/1VsCp5T
Submitted January 27, 2016 at 09:37PM by ivaylopivanov
Submitted January 27, 2016 at 09:37PM by ivaylopivanov
Create instant node APIs in your browser with Tonic Endpoint
http://ift.tt/202EJY1
Submitted January 27, 2016 at 06:16PM by rboucher
Submitted January 27, 2016 at 06:16PM by rboucher
WordExpress Schema: An npm module that connects to a WordPress database and provides a GraphQL Schema
http://ift.tt/1SK0yqA
Submitted January 27, 2016 at 02:56PM by ramsaylanier
Submitted January 27, 2016 at 02:56PM by ramsaylanier
2016 This Site Likely Contains Sexually Explicit Photos Of Someone...You Know and iid:aodastdaisaandiso
http://ift.tt/1nn5a93
Submitted January 27, 2016 at 08:47AM by gentlenwillma
Submitted January 27, 2016 at 08:47AM by gentlenwillma
Tuesday, 26 January 2016
Connect-flash sometimes working, sometimes don't
Hello!RepositoryGot this code with a connect-flash on board, but there is some bug: messageSuccess sometimes just don't appear, don't working.app.get('/find-user', function (req, res) { User.find({'local.email': req.query.email}, function (err, user) { if (err) throw err; userEmail = user[0].local.email; userName = user[0].local.name; userPhone = user[0].local.phone; if (userEmail != undefined && userEmail != '') { emailAnswer = 'email: ' + userEmail; } if (userName != '' && userName != undefined) { nameAnswer = 'name: ' + userName; } if (userPhone != '' && userPhone != undefined) { phoneAnswer = 'phone: ' + userPhone; } req.flash('messageSuccess', [emailAnswer, nameAnswer, phoneAnswer]); res.redirect('/profile'); }); }); app.all('/profile', isLoggedIn, function (req, res) { res.render('profile.ejs', { user: req.user, messageSuccess: req.flash('messageSuccess'), messageFailure: req.flash('messageFailure') }); }); I've been tormenting myself by this for a few hours but still can't find out why it's sometimes now working.
Submitted January 27, 2016 at 12:55AM by GodOfTheMetal
Submitted January 27, 2016 at 12:55AM by GodOfTheMetal
How do I deploy nodejs applications in production?
I'm trying to get up to speed on all the new web techs. I come from a background similar to LAMP. I've managed to get a few rails apps deployed over the last few years and now I'm trying to figure out nodejs. Specifically... deploying nodejs applications in production.I started working with Google's Web Starter Kit and I understand that this is just the front-end (it spits out some static assets). How do I "pair" this with a server side application in a production environment? Do I need to run two servers?I have some experience with AWS (specifically their elastic beanstalk service), and deploying rails applications. As in rails, we don't typically let rails handle the requests. How does this work for nodejs? Do I still use something like nginx?
Submitted January 27, 2016 at 12:21AM by neonlibra
Submitted January 27, 2016 at 12:21AM by neonlibra
ME(without Angular)N stack app error.
Hello everyone!I have started learning and using the MEAN stack for almost two months now, Its awesome and really fun to build app's with it, I love it so far!On my latest project (a portfolio for myself) I have encountered an error. " Cannot read property 'username' of undefined " This happens when I try to register on the app (I am using C9 as an IDE) The logic that handles the registration process is the same as on my other apps.If you could help me out to debug this that would be great! Here is the code: http://ift.tt/1Tm9Dp9
Submitted January 26, 2016 at 08:20PM by TeddySmoker
Submitted January 26, 2016 at 08:20PM by TeddySmoker
esprev: Preconfigured Babel with support for ES6, stage 2, and stage 3.
http://ift.tt/1nlQ43J
Submitted January 26, 2016 at 07:07PM by shannonmoeller
Submitted January 26, 2016 at 07:07PM by shannonmoeller
Cannot install node on Ubuntu 15.04
This is where I tried to download nodeI have tried to install from Source code, wget http://ift.tt/1EpwiF5, none of the commands work after installationI have tried from the packet manager, curl -sL http://ift.tt/1oa11OK | sudo bash - and it would not open node as well, I made the js file, console.log('hello world'); and even running the file spit out no output.I tried the GitHub Repository, when I went into the file, only the readme was present. git clone git://github.com/ry/node.git, i could not ./configure and move on to rest of installationFinally I have tried from Node Version Manager, but the version listed was not found. curl http://ift.tt/15PmWZm | sh, There is a command to update default version, the one listed does not exist.
Submitted January 26, 2016 at 05:26PM by burninfate
Submitted January 26, 2016 at 05:26PM by burninfate
This Site Likely Contains Sexually Explicit Photos Of Someone You Know! for node
http://ift.tt/1PALtYe
Submitted January 26, 2016 at 05:10PM by soturlippnog
Submitted January 26, 2016 at 05:10PM by soturlippnog
Example Multicolour App - REST API generator
http://ift.tt/1JBGX9s
Submitted January 26, 2016 at 04:23PM by dmackintosh88
Submitted January 26, 2016 at 04:23PM by dmackintosh88
Convert PHP array into JSON object?
I'm very new to node and I'm having some trouble figuring out how to convert a PHP serialized array into something useful for node.I have installed the php-unserialize package, but I'm struggling with getting the strong it generates into a usable JSON object.Here is a snippet of my current code and output: http://ift.tt/23qRnz7, I want to be able to use something like object.form_title and have it return "Conditional Logic Example", but I don't seem to be able to do that. If I use JSON.parse(formObject), I get an error from the parser.
Submitted January 26, 2016 at 04:07PM by ZachSka87
Submitted January 26, 2016 at 04:07PM by ZachSka87
Emacs vs. WebStorm For Node.js Development
http://ift.tt/1NxD3Js
Submitted January 26, 2016 at 03:20PM by wo1fgang
Submitted January 26, 2016 at 03:20PM by wo1fgang
Turn off npm3's progress for 2x speedup!
https://twitter.com/gavinjoyce/status/691783314261331969
Submitted January 26, 2016 at 02:02PM by bittered
Submitted January 26, 2016 at 02:02PM by bittered
node-big-rig: A CLI tool to parse trace files
http://ift.tt/1klYQ0A
Submitted January 26, 2016 at 01:48PM by a0viedo
Submitted January 26, 2016 at 01:48PM by a0viedo
Speed up npm 2x by disabling the progress bar
https://twitter.com/gavinjoyce/status/691773956144119808
Submitted January 26, 2016 at 01:26PM by deftly
Submitted January 26, 2016 at 01:26PM by deftly
Advice wanted for designing App architecture
Hi, I am absolute newbie in Node and JavaScript. I am trying to design a web app and before diving into it, I want to get some opinions for the architecture. Because I learned with a hard lesson that if you don't plan your architecture well, it will fall apart not now but in the future for sure.My app will have basic REST API with usual GET POST PUT etc. It is an API for updating exchange rate of different currencies. Users add currencies to monitor(POST). When it is added, system queries xe.com for the exchange rate and adds currency to user’s table(Mongodb) and show the result. User can update the current exchange rate whenever he sends request to same endpoint(GET). Also there is some sort of cron job or queue system that sends email notification to users per hour according to last update time of currency. Cron job or queue system should allow deleting or updating job if it is not started.For now I am using Express, Mongodb and Jade as template engine. I heard Koa but all the resources I have found mostly based on Express therefore I went with Express. I use request,cheerio and async modules for asynchronous html scrapping.I will really appreciate if you can give me some advice for the architecture or point me to some resources that I can check it out and learn. Thanks.
Submitted January 26, 2016 at 01:13PM by Lapter
Submitted January 26, 2016 at 01:13PM by Lapter
How I built a user-friendly csv import in Loopback
http://ift.tt/20qufyt
Submitted January 26, 2016 at 12:52PM by clementrp
Submitted January 26, 2016 at 12:52PM by clementrp
trainjs – Step by step to create an application
http://nodeontrain.xyz
Submitted January 26, 2016 at 10:02AM by train255
Submitted January 26, 2016 at 10:02AM by train255
Improved file and directory watching
http://ift.tt/1Tl78Do
Submitted January 26, 2016 at 10:06AM by bshens
Submitted January 26, 2016 at 10:06AM by bshens
Kindergarten (first beta released v0.1.2): Secure your node applications using sandbox pattern. More features will come soon!
http://ift.tt/1OTytaz
Submitted January 26, 2016 at 09:30AM by Ch4rAssassin
Submitted January 26, 2016 at 09:30AM by Ch4rAssassin
Nodal 0.6: Tests as First-Class Citizens, Deep Joins and More
http://ift.tt/1Nx9dF1
Submitted January 26, 2016 at 08:55AM by keithwhor
Submitted January 26, 2016 at 08:55AM by keithwhor
Having hard-time finding jobs
Well, it's okay now, if I ever need to look for jobs near me, I just Kunvet ("con-vit"). All qualified jobs, great resource for students!http://www.kunvet.com
Submitted January 26, 2016 at 08:28AM by badboybigbill
Submitted January 26, 2016 at 08:28AM by badboybigbill
Monday, 25 January 2016
Common DBs to connect with Socket.io/websockets?
I've been working on a portfolio project with React+Redux and now moving into the backend side of persistence -- I'd like to keep the client in sync with data changes using websockets -- while the choice of DB will also depend on how the data should be organized and retrieved.. I'm also curious about which DBs are commonly used with e.g. Socket.io -- I think that already I'd like to use a relational database but I haven't found much on using Socket.io with Postgres.. Thanks for any ideas and inspiration!
Submitted January 26, 2016 at 01:14AM by thukjeche
Submitted January 26, 2016 at 01:14AM by thukjeche
ramsaylanier/WordpressExpress · GitHub
http://ift.tt/1OLcUep
Submitted January 26, 2016 at 12:15AM by yeso126
Submitted January 26, 2016 at 12:15AM by yeso126
WordPress using Node, Express, and React.
http://wordexpress.io/
Submitted January 25, 2016 at 11:52PM by geekygirlhere
Submitted January 25, 2016 at 11:52PM by geekygirlhere
timequerylog: JSON logging in files separated by hour with query based on time and match function
http://ift.tt/1Jzp9Mh
Submitted January 25, 2016 at 11:22PM by runvnc
Submitted January 25, 2016 at 11:22PM by runvnc
mongoose-schema-serializer and deserializer to get your schemas over the network easily
http://ift.tt/1OKOb9O
Submitted January 25, 2016 at 09:36PM by Capaj
Submitted January 25, 2016 at 09:36PM by Capaj
Could somebody explain weather my nodejs "makes sense"?
Hey. First time I'm posting here. I'm not new to programming but I am completely new to Node. I was hoping somebody could check out my code and tell me if it makes sense, from a Node stand point. Are my callbacks being used correctly, do the asynchronous methods click, stuff like that.The code is basically to select info from db, convert it to a js object and then convert this object to json, before writing it back to the database.'use strict' var _ = require('lodash'); var async = require('async'); var seneca = require('seneca')({ timeout: 10 * 60 * 1000 }); var config = require('../config/config.js')(); seneca.options(config); seneca.use('postgresql-store'); seneca.ready(function(){ function run(cb){ var eventsEntity = seneca.make$('cd/events'); async.waterfall([ function(done){ eventsEntity.list$({fields:['dates']}, {limit$: 'NULL'}, done); }, function(events, done){ async.eachSeries(events, function(event, done)){ var dates_obj = JSON.parse(eventsEntity); var dates_json = JSON.stringify(dates_obj); eventsEntity = dates_json; event.save$(eventsEntity, done); } } ], cb); } } run(function (err)){ if(err){ console.log('error', err); } console.log("Done"); seneca.close(); };
Submitted January 25, 2016 at 08:34PM by adam4543
Submitted January 25, 2016 at 08:34PM by adam4543
Back end coding help
Hello everyone, I am currently busy with a website. One feature is that you can fill in a few inputs and hit create to add a div with the input values in them to the HTML. I know that you can add a "live" script for the divs to the HTML, but I don't know how. If someone could help me with Node I would really appreciate it, thanks :)
Submitted January 25, 2016 at 05:38PM by timgfx
Submitted January 25, 2016 at 05:38PM by timgfx
npm is holding a conference
http://npm.camp/
Submitted January 25, 2016 at 03:20PM by steveklabnik1
Submitted January 25, 2016 at 03:20PM by steveklabnik1
AdonisJS the true MVC framework for Nodejs with basics done right [x-post from /r/javascript]
http://adonisjs.com/
Submitted January 25, 2016 at 01:27PM by romainlanz
Submitted January 25, 2016 at 01:27PM by romainlanz
Redirecting from POST [Express 4]
Hi! In this piece of routes code I'm trying to make a different flash-messages appear depending on user input (correct or wrong pass; if correct -> change current pass, show flash-message).The problem is that I can't redirect from POST. How it can be done? var flash = require('connect-flash'); var User = require('../app/models/user'); app.all('/change-info', function (req, res) { if(req.user.validPassword(req.body.oldPassword)){ User.findOneAndUpdate({'local.password': req.user.local.password}, {'local.password': req.user.generateHash(req.body.newPassword)}, function (err, user) { console.log(user); }); res.redirect('/flash-success'); }else{ res.redirect('/flash-failure'); } res.send(); }); app.get('flash-failure', function (req, res) { req.flash('pass-changed', 'Wrong current password'); res.redirect('/profile'); }); app.get('/flash-success', function (req, res) { req.flash('pass-changed', 'Password successfully changed'); res.redirect('/profile'); }); app.get('/profile', isLoggedIn, function(req, res) { res.render('profile.ejs', { user: req.user, message: req.flash('pass-changed') }); });
Submitted January 25, 2016 at 10:49AM by GodOfTheMetal
Submitted January 25, 2016 at 10:49AM by GodOfTheMetal
Sqlite3 help
Hey gang,I've just working my way through a book called Node Craftsman, and am doing some database stuff at the moment.I've got a test failing at the moment, we add three rows to the db, then send a request to our server (basically just SELECT * FROM table), but the response has an extra line;Expected:{ _items: [ { id: 1, value: 'Aubergine', categoryID: 1 }, { id: 2, value: 'Onion', categoryID: 1 }, { id: 3, value: 'Knife', categoryID: 2 } ] } Actual:{ _items: [ { id: 1, value: 'Aubergine', categoryID: 1 }, { id: 2, value: 'Onion', categoryID: 1 }, { id: 3, value: 'Knife', categoryID: 2 } ], _links: { parent: { href: 'http://localhost:8080/api' } } } So after poring over these two objects for ages expecting me to have misspelled Aubergine, I realise there's an extra object in the actual response.Ok so what's up with _links?Here's what my server looks like: http://ift.tt/1ntzIXc (forgive my spacious formatting, I need all the help I can get to get my head around all the callbacks).Is '_links' some metadata added to the bottom of tables? What's the easiest way to prune it from results?Any help, pointers, directions, links to _links info you guys could provide would be super helpful.Thanks a bunch, thombsaway
Submitted January 25, 2016 at 09:26AM by thombsaway
Submitted January 25, 2016 at 09:26AM by thombsaway
Sunday, 24 January 2016
Meet doubleagent – the ES7 async/await aware testing util for Node.js apps
http://ift.tt/1nt6TKy
Submitted January 25, 2016 at 07:35AM by wo1fgang
Submitted January 25, 2016 at 07:35AM by wo1fgang
activity-logger: Log activities, show the time it takes to complete them.
http://ift.tt/1PwtgEP
Submitted January 25, 2016 at 04:11AM by hswolff
Submitted January 25, 2016 at 04:11AM by hswolff
How to transfer JS/HTML files to website via FTP?
Ok let me explain my situation. After completing this tutorial:http://ift.tt/1ZXxT5W now have a nice chat application with the input on the html page showing on the CMD, and then being broadcasted back to the html page where it is turned into text. How would I apply this to a website using FTP so it can be used by other people?Cheers.
Submitted January 25, 2016 at 01:05AM by SlateFx
Submitted January 25, 2016 at 01:05AM by SlateFx
usBabyNames.js: historical data about US baby names as an NPM package
http://ift.tt/1nI4mvX
Submitted January 24, 2016 at 09:10PM by JohnnySuburbs
Submitted January 24, 2016 at 09:10PM by JohnnySuburbs
Minimal starter for a Node/Web ES6 library. Will be happy to hear comments and ideas.
http://ift.tt/1NtDh4i
Submitted January 24, 2016 at 08:51PM by liady769
Submitted January 24, 2016 at 08:51PM by liady769
Node.js Debugger
http://ift.tt/20nanfw
Submitted January 24, 2016 at 08:14PM by killaSquad
Submitted January 24, 2016 at 08:14PM by killaSquad
lawson: a couchbase odm, feedback welcome! ;)
http://ift.tt/1OHn0g8
Submitted January 24, 2016 at 04:52PM by mastilver
Submitted January 24, 2016 at 04:52PM by mastilver
Feature flag libraries and resources for Node.js
http://ift.tt/1Ky2FpN
Submitted January 24, 2016 at 03:39PM by justinucd
Submitted January 24, 2016 at 03:39PM by justinucd
Mongoose vs MongoDB native for a Mongo newbie?
Hi everyone, I know this has been already talked through but I would like to have some more opinions about it.Considering I have just started with MongoDB in general and I have done a couple of example projects with both MongoDB and Mongoose, I am having a very hard time to choose whether to use one or the other on my NodeJS projects.Here are the reasons why I would choose MongoDB native:The documentation is (in my opinion) much better organized. It's very easy to find the method you are looking for and every single one has at least one good example that's quite easy to understand.Should be faster (refs: http://ift.tt/1K4OL3r , http://ift.tt/1PM3vRo )Here are the reasons why I would choose Mongoose:Need to define a schema. Not a huge plus in my opinion, but considering my little experience this could be of some help.No need to care about opening and closing of db connections, optimizations and (maybe) security issuesI care a lot about the documentation since it's a daily resource while coding on new stuff. Mongoose docs ( http://ift.tt/1qEPsTa ) and navigation is not very well organized imho, while it's much better over at MongoDB.What do you think? Why would you choose one over the other considering the above premises?Thanks
Submitted January 24, 2016 at 12:08PM by damnko
Submitted January 24, 2016 at 12:08PM by damnko
A list of Crankshaft bailout reasons with examples
http://ift.tt/1S29nMF
Submitted January 24, 2016 at 10:39AM by bardadymchik
Submitted January 24, 2016 at 10:39AM by bardadymchik
What resource would you recommend to someone knows basic JavaScript and wants to master nodejs?
i learn best from books...so any goods book suggestions would be welcome...
Submitted January 24, 2016 at 10:42AM by isachinm
Submitted January 24, 2016 at 10:42AM by isachinm
Saturday, 23 January 2016
NodeJS Hacking Challenge
http://ift.tt/1ODMGdu
Submitted January 24, 2016 at 07:06AM by wo1fgang
Submitted January 24, 2016 at 07:06AM by wo1fgang
Why is my module installing devDependencies when used via `npm install`?
I just published a module, pg.promised. It only has one dependency, but multiple devDependencies. I created a new project to make sure it was working.mkdir mtest ; cd mtest npm install pg.promised it was put into node_modules but inside /node_modules/pg.promised, there was another node_modules directory with all of dependencies, dev and regular, were in there. I'm using npm v3.5.3. Is this how it's supposed to work? I thought the tree should be much flatter and the devDeps shouldn't be installed when npm install pg.promised is run.
Submitted January 24, 2016 at 02:06AM by sdellysse
Submitted January 24, 2016 at 02:06AM by sdellysse
Accessing iCloud features from node to put on my website
i am building an AI system in my room with my raspberry pi connected to a display. i'm building the GUI with node.js but how would i display my iCloud features such as reminders, calendar, findmyiphone and mail on the webpage?
Submitted January 24, 2016 at 01:53AM by Aaronrc79
Submitted January 24, 2016 at 01:53AM by Aaronrc79
concierge - a node CLI app to rename and tidy movies [x-post /r/usenet]
I posted this in /r/usenet but thought I might x-post here too. Sorry if it's not appropriate for this sub, please report / remove as necessary.So I made a node CLI app which renames and tidies directories with movies.Some notable features:it seems pretty accurate at identifying moviesits highly configurablenice clean code & has a rad plugin structureworks as a sabnzbd post processing script.I should say I'm an amateur coder.. and have never really contributed much to anything. In addition, I've only done a few tests with concierge myself so it's likely to be buggy as hell, as in “pre alpha”. I'm not looking for fame or fortune here, I'm well aware that this app has a really limited use case in it's current form. Having said that, I know I've wanted something like this for a long time, so I thought I'd publish it just in case anyone else is in fact interested.So you can find Concierge on github. The readme should have instructions to get you up and running.Just to reiterate, I've only tested this on my own debian system, so you probably shouldn't run it on media you'd be upset if you lost.I guess I'm looking for two things at this time.. Firstly, I'd love for you to clone the repo and have a go at running it.. I'm sure there will be problems, I just need to know what they are! If you do run into anything, run with “-logLevel debug” and create an issue or report here or whatever.Secondly, I need to know if there's actually any interest in an app like this.. if so, are there any features you'd like to see?
Submitted January 23, 2016 at 11:44PM by Mr5o1
Submitted January 23, 2016 at 11:44PM by Mr5o1
Serving Content In Koajs With Marko
https://www.youtube.com/watch?v=kumHN71v3oY
Submitted January 23, 2016 at 07:49PM by NodeMasterPro
Submitted January 23, 2016 at 07:49PM by NodeMasterPro
gently-copy: Colorfully and informatively copy files without overwriting
http://ift.tt/1VgJgzo
Submitted January 23, 2016 at 07:12PM by dmitri14_gmail_com
Submitted January 23, 2016 at 07:12PM by dmitri14_gmail_com
Marko versus Dust | Patrick Steele-Idem
http://ift.tt/1ONYQ1y
Submitted January 23, 2016 at 06:01PM by NodeMasterPro
Submitted January 23, 2016 at 06:01PM by NodeMasterPro
Looking to try one of the new frameworks for a school project
Hi everyone,I have a project where we have to create some kind of Netflix clone and we'll use Oracle for the DB.I'm looking for a boilerplate like the ''express hackaton starter'' but with a newer framework that uses ES6-ES7 like Koa2 or Nodal (or another one if you know some).For people that don't know the ''express hackaton starter'', it's a boilerplate for a fullstack webapp/website having all the structure and everything that is needed. I only have to modify the models, the business logic and add some routes and views.Thanks in advance.
Submitted January 23, 2016 at 05:29PM by skini26
Submitted January 23, 2016 at 05:29PM by skini26
Trouble with installation on Mint 17/Ubuntu 14.04 in VirtualBox. Typing "node" and anything else in console will just return system command prompt.
I'm trying to just get Node up and running.I installed with: sudo apt-get install node and it does kick down to the next line so it kinda works but I do not get the node prompt, just the system prompt. Typing in node -v does the same, just kicks down a line and gives me the system prompt. Same thing happens when I try running a hello-world.js file.Before installation, typing "node" would tell me the command is unrecognized so the installation is doing something.I tried rebooting after install just in case that was the issue.According to SO, there is no error log. How can I troubleshoot what is wrong with the install? Has anyone run into this before?
Submitted January 23, 2016 at 04:45PM by ipitythefoobar
Submitted January 23, 2016 at 04:45PM by ipitythefoobar
Arctic JS 2016 Videos
https://www.youtube.com/playlist?list=PL3bvPCw5QCLLJUL2Q_bBI1bi9bYQ-4hci
Submitted January 23, 2016 at 11:45AM by eljefederodeodeljefe
Submitted January 23, 2016 at 11:45AM by eljefederodeodeljefe
Why is Node.js so popular for REST API?
http://ift.tt/1OEfAdN
Submitted January 23, 2016 at 08:45AM by p_irish
Submitted January 23, 2016 at 08:45AM by p_irish
Friday, 22 January 2016
Made an es7 boilerplate demo
http://ift.tt/1OE7SQG
Submitted January 23, 2016 at 07:46AM by matthova
Submitted January 23, 2016 at 07:46AM by matthova
Is node + express + angular too much for a one page app?
It won't be anything too complex to be honest. I'm just curious, in terms of over all effectiveness if its worth using these 3 in tandem. Thank you!
Submitted January 23, 2016 at 12:45AM by bumbleB_tuna
Submitted January 23, 2016 at 12:45AM by bumbleB_tuna
Raspberry pi and Koa2 - Cool idea, but 'npm install' takes hours. Suggestions?
http://ift.tt/1JqMMGO
Submitted January 23, 2016 at 12:21AM by matthova
Submitted January 23, 2016 at 12:21AM by matthova
Quick and dirty learning resources?
Any one have some recommendations for learning node quickly? I did the "Learn Python the Hard Way" thing not too long ago and that was great. I've been given a project at work that is over my head though and I need to figure out how javascript/node works.Some more info on the situation: I only just started seriously writing code a little less than a year ago (all self-taught), I have never written a line of javascript, know next to nothing about node, and I only just heard of gulp a few days ago. I need to tweak some gulp script I was given so one of the bosses can more easily deploy changes to a remote server. They want this done asap.If this sounds like a crappy situation to you, you would be correct.
Submitted January 22, 2016 at 08:43PM by thelastknowngod
Submitted January 22, 2016 at 08:43PM by thelastknowngod
A bit better spec reporter for mocha
http://ift.tt/1QpW5rR
Submitted January 22, 2016 at 08:10PM by bardadymchik
Submitted January 22, 2016 at 08:10PM by bardadymchik
In search of ideas for npm packages
I am currently helping teach a class at my local university. We are thinking it would be really cool for students write and publish their own packages to the npm registry. I would really like to be able to present a list of some ideas for packages the students could write.They don't have to be ground breaking or anything. Just some simpleish ideas that could be cool or fun. Thanks!
Submitted January 22, 2016 at 06:36PM by LiveTwizzle
Submitted January 22, 2016 at 06:36PM by LiveTwizzle
Simotegy, I'm putting up my first webgame and I'm excited to see what people think. The game is basically like a mashup of King of the Hill and Frogger, with multiplayer. So come on and check it out!
http://ift.tt/1RDGNAM
Submitted January 22, 2016 at 06:23PM by Jon_Nieves
Submitted January 22, 2016 at 06:23PM by Jon_Nieves
Node ORMs and Geo-Spatial Data?
I'm relatively new to node and I'm having a hard time finding packages that might be able to assist me with the geo spatial app I'm making.I have a need to store Geometry in a PostgreSQL/PostGIS database - Points, Polygons, Multipolygons, etc. I have not been able to find an ORM that gracefully, or at all, handles geometry. From what I see from Googling, the few example projects that say they interface with PostGIS drop into the raw SQL query of Knex and write raw SQL into the databse. This isn't an option for me.== What I've looked at ==Bookshelf.js - No out of the box support for Geometry. I could install the bookshelf-json-columns specify the geometry columns as JSON and store the shapes as GeoJSON maybe. This would be more of a work around than anything. I'm also wary of how new this plugin is and what kind of support it would have in the future.Sequelize.js - The official documentation doesn't mention anything about supporting geometry but then the several GitHub pages make mentions that the changelog shows that they added Geometry support for postgres in 3.4.0. I popped into their IRC for some help but didn't make much headway. The fact that there's a disconnect between the documentation and what it supports makes me uncomfortable. Since I'm new I would hope to see some documentation to get me to starting point in how to implement the Models appropriately for geometry.Has anyone encountered a need for Geometry with PostGIS in Node before? Does anyone have a suggestion for a good ORM that you might be able to point me ?
Submitted January 22, 2016 at 06:05PM by PensiveLionTurtle
Submitted January 22, 2016 at 06:05PM by PensiveLionTurtle
Cannot display value from Mongodb on my Jade page
http://ift.tt/1ndYoCj
Submitted January 22, 2016 at 06:14PM by pleasehelpme199
Submitted January 22, 2016 at 06:14PM by pleasehelpme199
[Pro Tip] For whoever wants to take full advantage of the power of JavaScript, at the moment you can request free developer accounts with Meteor
http://l.aunch.us/WTTf1
Submitted January 22, 2016 at 05:48PM by Nabukadnezar
Submitted January 22, 2016 at 05:48PM by Nabukadnezar
I'm posting data to my Node app but can't seem to retrieve the data from within Node itself.
I'm attempting to post data to my Node app$.ajax({ dataType: "json", method: "POST", url: "/users/new", data: { first_name: "Conor", last_name: "McGregor", id: 3 }, success: function (data) { console.log("Success: ", data); }, error: function (error) { console.log("Error: ", error); } }); . . . but am unsure of how to access the post data from within the app itself.userRouter.route("/new") .post(function (req, res) { console.log(req); //console.log(req.body); } There doesn't seem to be any good documentation as to how to accomplish something so simple for Node--at least that's what I'm finding after over an hour of searching. Any idea how to accomplish this?
Submitted January 22, 2016 at 05:51PM by ExNihil
Submitted January 22, 2016 at 05:51PM by ExNihil
Relax – A CMS on Top of React and Node.js (I really hope this one gets popular)
http://ift.tt/1FSmJWY
Submitted January 22, 2016 at 05:17PM by pipechang
Submitted January 22, 2016 at 05:17PM by pipechang
£20 paypal to someone who can add an image upload/sharing to my chat room application using node & socket
Posted before, really struggling with getting the image upload to work. Reverted back to just the basic chat room. Really need help!
Submitted January 22, 2016 at 01:06PM by Jakewright0409
Submitted January 22, 2016 at 01:06PM by Jakewright0409
Isomorphic ClojureScript with Reagent and Node.js
http://ift.tt/1RWdhXq
Submitted January 22, 2016 at 12:38PM by wo1fgang
Submitted January 22, 2016 at 12:38PM by wo1fgang
Thursday, 21 January 2016
How I fixed libuv (the basis of Node.js)
http://ift.tt/1K0cstO
Submitted January 21, 2016 at 10:54PM by the_legend_of_dave
Submitted January 21, 2016 at 10:54PM by the_legend_of_dave
Node.js v4.2.6 (LTS) and v5.5.0 (Stable) released
http://ift.tt/1jhHvo7
Submitted January 21, 2016 at 10:39PM by phelaz
Submitted January 21, 2016 at 10:39PM by phelaz
The Issue With Global Node Packages – Smashing Magazine
http://ift.tt/1ZER0wl
Submitted January 21, 2016 at 10:14PM by kennbrodhagen
Submitted January 21, 2016 at 10:14PM by kennbrodhagen
Should Marko support Jade-like syntax?
http://ift.tt/1PHtzNt
Submitted January 21, 2016 at 07:44PM by philidem
Submitted January 21, 2016 at 07:44PM by philidem
PWM and Node.js (and, obviously, Raspberry PI)
http://ift.tt/1PFXYvu
Submitted January 21, 2016 at 05:14PM by AlexanderBusch
Submitted January 21, 2016 at 05:14PM by AlexanderBusch
Where to place database config/functions in Express?
Hello! I'm pretty new to Node.js and I've started developing a webapp in the Express framework which includes a classic user-login. I want to grab the details through a POST request, and use "router.post()" to validate the user with my database.However, I am a bit unsure of what the conventions are, regarding database-related files. I've made a new file called 'database.js' which has the connection info, and a function called validateUser(), which accepts two parameters - the username and login. I've exported the function to my router.js. In the function's callback, i want to do a "response.send()". But how can I do that when the 'response' is in my router.js? Maybe add 'response' as a parameter in the function.Anyways, do you guys have your database config, functions & router (with GET/POST handlers) all in the same file? Or do you seperate them? Hope I made sense.. :)
Submitted January 21, 2016 at 04:33PM by Piotyras
Submitted January 21, 2016 at 04:33PM by Piotyras
A RabbitMQ microservice framework in Node.js
http://ift.tt/1PkadUv
Submitted January 21, 2016 at 02:49PM by tjmehta
Submitted January 21, 2016 at 02:49PM by tjmehta
Is there any alternative to hunter-gatherer - a parallel rest client?
So I basically use hunter-gatherer (http://ift.tt/1RVljzU) with one of my projects and was wondering if any alternatives exists.Basically hunter-gatherer is a parallel rest client that can handle paging of API results on it's own.Here is it's own description to be more clear;It's ideally suited to the types of calls you see via APIs. Here's one example from the Etsy API (http://ift.tt/1UdNqrn) that you need to make if you want to gather all of a users' active listings: http://ift.tt/1UdNp70 http://ift.tt/1UdNpng http://ift.tt/1UdNqrt http://ift.tt/1UdNpnk http://ift.tt/1RVlmf4 http://ift.tt/1UdNpnm Traditionally, you'd loop through each call, process the results of that call, and then call the next offset, process, ad nauseum. Not only is this super inefficient, it's slow and a pain in the ass to re-code all the time. Especially when this pattern occurs in many APIs, and all that changes between them for the most part are the URL and how you process the results. So let's abstract out everything else! And lastly, with HunterGatherer each of these calls happen simultaneously, up to the maximum number of simultaneous connections allowed based on the remote API terms of usage. Non-blocking FTW! I'm looking for an alternative because the library is out of date (http://ift.tt/1UdNpno) and not updated since 4 years.
Submitted January 21, 2016 at 01:37PM by raistlinthewiz
Submitted January 21, 2016 at 01:37PM by raistlinthewiz
socket.io connection event not working
I am new to nodejs and express and trying the socket.io just a simple chat application. Its very simple code everything is just fine but there is no event fired logs on the node console. Connection event code is not working.app.jsvar express = require('express'), app = require('express')(), http = require('http').Server(app), io = require('socket.io')(http), start = require('./routes/index.js'); app.use('/', start); io.on('connection', function(socket){ console.log('a user connected'); socket.on('disconnect', function(){ console.log('user disconnected'); }); }); var server = app.listen(3000, function () { var host = server.address().address; var port = server.address().port; }); module.exports = app; layout.jadedoctype html html(lang="en") head script(type="text/javascript" src="http://ift.tt/1T8jUVF") script. var socket = io(); body block content
Submitted January 21, 2016 at 01:23PM by laravelio
Submitted January 21, 2016 at 01:23PM by laravelio
How to track down CPU issues in Node.js
http://ift.tt/1la3Q8a
Submitted January 21, 2016 at 11:48AM by scepticguy
Submitted January 21, 2016 at 11:48AM by scepticguy
Small and fast logger
http://ift.tt/1RV2IEa
Submitted January 21, 2016 at 11:39AM by bardadymchik
Submitted January 21, 2016 at 11:39AM by bardadymchik
Performance test. Nodejs with 20 million connect at time in 1 table on Mongodb
I want write code like this. How to using nodejs to check performance test? Thank you.
Submitted January 21, 2016 at 07:57AM by r0ysy0301
Submitted January 21, 2016 at 07:57AM by r0ysy0301
Wednesday, 20 January 2016
Statty.js -- Wanna help refactoring?
I made this crummy node library, statty.js (http://ift.tt/1Ryx0KV), and I've been too busy to research how to refactor it. If someone can lead the way with the design, and submit a pull request with an example of one refactored distrubtion, from what I have, I will happily finish replicating it for the other distriutions. I'm not a JavaScript wizard and I can't find my way around using lots of "this" statements, which are creating nasty global variables. I've already had some bashing done here, so I get that I'm doing it wrong. I'm looking for help or constructive criticism ideally.
Submitted January 21, 2016 at 06:33AM by R0FLS
Submitted January 21, 2016 at 06:33AM by R0FLS
Comparison to async - looks pretty.. AMAZING! Sadly it is prototype version, not sure if i can use on production. Anyone knows stable version of this technique??
http://ift.tt/1NlRq3A
Submitted January 21, 2016 at 06:15AM by dankeybiz
Submitted January 21, 2016 at 06:15AM by dankeybiz
Node.JS Chat room issue with sending images
Im not the strongest programmer in the world, just wondering if anyone can give me a hand/tell me where i've gone wrong. My project is supposed to be a chat room that can send images, it worked fine before I tried to do the image sharing. (sorry for repost, im just really stuck)HTML
App/Servervar fs = require('fs'), path = require('path'), io = require('socket.io'), static = require('node-static'), express = require('express'), app = express(), server = require('http').createServer(app); server.listen(3000); var file = new static.Server(path.join(__dirname, '..', 'public')); app.get('/', function(req, res){ res.sendfile(__dirname + '/index.html'); }); app.use(express.static(path.join(__dirname, 'public'))); function app(req, res) { file.serve(req, res); }; var io = io.listen(app), nicknames = []; //recieving event on the server side io.sockets.on('connection', function(socket){ socket.on('send message', function(data){ socket.broadcast.emit('new message', {msg: data, nick: socket.nickname}); }); socket.on('image message', function(data){ socket.broadcast.emit('image message', {msg: data, nick: socket.nickname}); }); socket.on('new user', function(data, callback){ if (nicknames.indexOf(data) != -1){ callback(false); } else{ callback(true); socket.nickname = data; nicknames.push(socket.nickname); updateNicknames(); } //?// }); function updateNicknames(){ io.sockets.emit('usernames', nicknames); } socket.on('disconnect', function(data){ if(!socket.nickname) return; nicknames.splice(nicknames.indexOf(socket.nickname), 1); updateNicknames(); }); }); Messagingvar socket = io.connect(); var $nickForm = $('#nickInput'); var $nickError = $('#nickError'); var $nickBox = $('#nickname'); var $users = $('#users'); var $messageForm = $('#sendMessage'); var $messageBox = $('#message'); var $chat = $('#chat'); var $sendImage = $('#sendFile'); socket.on('new message', message); socket.on('image message', image); //nickname input $nickForm.submit(function(e){ e.preventDefault(); socket.emit('new user', $nickBox.val(), function(data){ if(data){ $('#nickDiv').hide(); $('#chatDiv').show(); } else{ $nickError.html('That username is already taken, try again'); } }); $nickBox.val(' '); }); socket.on('usernames', function(data){ var html = ''; for(i=0; i < data.length; i++){ html += data[i] + '
' } $users.html(html); }); // text $messageForm.submit(function(e){ e.preventDefault(); socket.emit('new message', $messageBox.val()); $messageBox.val(''); }); socket.on('new message', function(data){ $chat.append('' + data.nick + ': ' + data.msg +
"); }); e.preventDefault(); socket.emit('send message', $messageBox.val()); $messageBox.val(''); }); // image $sendImage.bind('change',function(e){ var data = e.orginalEvent.target.files[0]; var reader = new FileReader(); reader.onload = function(evt){ image('me', evt.target.result); socket.emit('image message', evt.target.result); }; reader.readAsDataURL(data); }); socket.on('image message', function(base64Image){ $chat.append('' + data.nick + ': ' + data.msg + "
", ''); };
Submitted January 20, 2016 at 10:52PM by Jakewright0409
Enter a username
' } $users.html(html); }); // text $messageForm.submit(function(e){ e.preventDefault(); socket.emit('new message', $messageBox.val()); $messageBox.val(''); }); socket.on('new message', function(data){ $chat.append('' + data.nick + ': ' + data.msg +
"); }); e.preventDefault(); socket.emit('send message', $messageBox.val()); $messageBox.val(''); }); // image $sendImage.bind('change',function(e){ var data = e.orginalEvent.target.files[0]; var reader = new FileReader(); reader.onload = function(evt){ image('me', evt.target.result); socket.emit('image message', evt.target.result); }; reader.readAsDataURL(data); }); socket.on('image message', function(base64Image){ $chat.append('' + data.nick + ': ' + data.msg + "
", ''); };
Submitted January 20, 2016 at 10:52PM by Jakewright0409
Sequelize.js Model Question: HasOne Entity1 OR Entity2?
Hello all,Sequelize.js question here.I'm trying to define my models here, and I have one table (the Users) which has a field for realWorldID. This ID will either contain the realworldID of userType1 or userType2. (The userTypes are contained within two tables because only a subset of one type will be users, and each userType holds different data).Usually if it were only associating a User with one userType, I would be able to do: User.HasOne(userType1)But what I want to do is essentially User.HasOne(userType1 OR userType2)Is there any way to do this?
Submitted January 20, 2016 at 09:12PM by TLI5
Submitted January 20, 2016 at 09:12PM by TLI5
Introducing "devtool" – a new tool for debugging, developing & profiling Node applications
http://ift.tt/1OEeHQ8
Submitted January 20, 2016 at 06:59PM by mattdesl
Submitted January 20, 2016 at 06:59PM by mattdesl
New to NodeJS. Need a bit of help with SequelizeJS.
So, I'm building a simple API with ExpressJS and a MySQL database, and using Sequelize as an ORM.My question is how do you define the models (eg. User model) in a separate file and folder ? Like having a folder with all the models only. Since to define a sequelize model you have to first create a new instance and stuff like: var sequelize = new Sequelize('database', 'username', 'password', {});
Submitted January 20, 2016 at 06:27PM by shortfuse07
Submitted January 20, 2016 at 06:27PM by shortfuse07
How can i make this video better
This video tutorial this is my first youtube video tutorial and i wanted to know how to make it better with presentation and the code ? here is a link My Link and thanks
Submitted January 20, 2016 at 05:02PM by livedb
Submitted January 20, 2016 at 05:02PM by livedb
Background Processes in Electron
http://ift.tt/1SxhYa3
Submitted January 20, 2016 at 05:33PM by smith-kyle
Submitted January 20, 2016 at 05:33PM by smith-kyle
Nodejs worth Chakra core
http://ift.tt/1Wuu6rl
Submitted January 20, 2016 at 04:37PM by vassadar
Submitted January 20, 2016 at 04:37PM by vassadar
rtc-everywhere: WebRTC on every platform, all with the same code
http://ift.tt/1PFaStH
Submitted January 20, 2016 at 03:53PM by ContraContra
Submitted January 20, 2016 at 03:53PM by ContraContra
Remember ultra-repl? I created a more mouse-driven alternative called "janeway". Let me know what you think.
http://ift.tt/1UblZ1k
Submitted January 20, 2016 at 12:42PM by skerit
Submitted January 20, 2016 at 12:42PM by skerit
Enable Node.js to run with Microsoft's ChakraCore engine
http://ift.tt/1JWrPTZ
Submitted January 20, 2016 at 11:20AM by wo1fgang
Submitted January 20, 2016 at 11:20AM by wo1fgang
require-g : import global modules
http://ift.tt/1ZADny4
Submitted January 20, 2016 at 10:06AM by javascripton
Submitted January 20, 2016 at 10:06AM by javascripton
Tuesday, 19 January 2016
Tonic Adds Node 5 Support
http://ift.tt/1PE4Jhx
Submitted January 20, 2016 at 02:55AM by tolmasky
Submitted January 20, 2016 at 02:55AM by tolmasky
SocketIO: Suggestions on clean way to add events to every client?
Hi there, I have a basic chat/video app that connects the user through WebRTC. Right now I handle the majority of the socketio code through the main app.js file, I'd like to pull the files out to make them testable and improve readability.I was thinking about doing something likelet MyClient = require('myclient') io.on('connection', function(socket){ MyClient(socket.client); Then inside 'myclient' I'd have an object of functions mapped to their event names.var events = { 'join':function(), 'leave':function(), } And one function that would do a for in loopfor(key in events){ client.on(key, events[key]); Is there a better way to do this, or a standard way?
Submitted January 19, 2016 at 11:24PM by fallen77
Submitted January 19, 2016 at 11:24PM by fallen77
Request.js delay breaks script
Script: http://ift.tt/1P41rYL with the node this week and tried to make a script that checks for 404 images on a website. I've got it all set up and decided to use request.js - The script didn't work and while debugging I noticed that there's some sort of delay on the request function; the loop runs, and then when it's done looping it starts to get the responses etc. This means that I'm constantly trying to do image.push(url) with 'var i' set to 39000 because of the delay. I hope I was able to explain my issue, is there a way around this?
Submitted January 19, 2016 at 10:39PM by glowdemon1
Submitted January 19, 2016 at 10:39PM by glowdemon1
Authorization service for a Microservices Architecture
http://ift.tt/1PoDIOM
Submitted January 19, 2016 at 09:07PM by kostarelo
Submitted January 19, 2016 at 09:07PM by kostarelo
Control iTunes via CLI
http://ift.tt/1Mp0oRI
Submitted January 19, 2016 at 08:07PM by dynamicallytyped
Submitted January 19, 2016 at 08:07PM by dynamicallytyped
Pull Request with ChakraCore Submitted to Node.js Mainline
http://ift.tt/1V5CRXt
Submitted January 19, 2016 at 07:18PM by sime
Submitted January 19, 2016 at 07:18PM by sime
Node Module Walk-Through: Get Port
http://ift.tt/1ZKEgcS
Submitted January 19, 2016 at 06:56PM by codeplanet
Submitted January 19, 2016 at 06:56PM by codeplanet
Introducing Gulp cozy - Manage your gulp tasks in a cozier way
http://ift.tt/1nuf7BL
Submitted January 19, 2016 at 06:39PM by loigiani
Submitted January 19, 2016 at 06:39PM by loigiani
Is there anywhere to get reliable documentation for Socket.IO's current versions?
Evidently these people change features pointlessly on such a rapid basis that they can't even keep their own documentation.
Submitted January 19, 2016 at 06:12PM by Yelnik
Submitted January 19, 2016 at 06:12PM by Yelnik
Dumpster - A lightweight, self-hosted and API-based file upload server supporting YubiKey OTP authentication.
http://ift.tt/1V5GSeH
Submitted January 19, 2016 at 05:43PM by nmaggioni1
Submitted January 19, 2016 at 05:43PM by nmaggioni1
The Issue With Global Node Packages
http://ift.tt/1nhAre7
Submitted January 19, 2016 at 04:45PM by a0viedo
Submitted January 19, 2016 at 04:45PM by a0viedo
library to migrate NoSql database?
I'm using couchbase and I can't find a library to migrate my data.I'm planning to write one (If I can't find a good one and when I got more time).
Submitted January 19, 2016 at 04:23PM by mastilver
Submitted January 19, 2016 at 04:23PM by mastilver
Cucumber js with Node framework for UAT
I'm looking into using cucumber js for my acceptance testing, unfortunately i am having to use Windows 10 for this and can't use a Unix emulator (not allowed to use any Unix system's which is making this 100x harder). The problem i am having is i can't find any good materials for how to setup and framework or a guide to setting up a project in Node for use with cucumber js for windows. I've spent last few days trawling through forums and youtube videos to try and find a solution.So the question is does anyone know a good place for resource material? i have tried a lot of personal blogs and the usual github/google +/ stackoverflowif anyone could help i'd appreciate it. like ALOT!
Submitted January 19, 2016 at 04:30PM by Reedy91a
Submitted January 19, 2016 at 04:30PM by Reedy91a
Make npm3's flat dependencies easier to find and sort on OS X
http://ift.tt/1nvykTN
Submitted January 19, 2016 at 02:21PM by bittered
Submitted January 19, 2016 at 02:21PM by bittered
How to optimize Sequelize (pg) + Node;
Hello folks,My question is: if I'm reating something like blog, social network or just some portal how should I handle with sql queryfing?Example #1:User is checking his statisitc and sees: Messages: 234 Games played: 23Now, every time user is reloading /stats page, query is executed. Why? Because after user send a msg or play a game his counter will increase +1. So SELECT count(*) from MESSAGES where id_from = user.id runs on whole big table to fill template engine "messages" variable.Example #2:user is checking out blog. Every refresh (F5) big query is executed to fill template engine with areticle short description, image, date, author etc.Question:How I should prevent such DB overload if 1k users will just check out blog and some users will spam F5? It will just kill my VPS... I'm using Sequelize on PostgreSQL if that means.
Submitted January 19, 2016 at 11:54AM by trickster00
Submitted January 19, 2016 at 11:54AM by trickster00
File Upload in Node.js
http://ift.tt/1QiI3bi
Submitted January 19, 2016 at 11:38AM by wo1fgang
Submitted January 19, 2016 at 11:38AM by wo1fgang
Module Starter Kit
http://ift.tt/1S1FDh5
Submitted January 19, 2016 at 11:42AM by javascripton
Submitted January 19, 2016 at 11:42AM by javascripton
Help a .NET Developer get into Node!
Greetings.I'm a full stack ASP.NET Developer and I'm trying to get into the Node.JS universe, mainly for front-end component development with React. I know JavaScript pretty well, but I'm really overwhelmed by the tools used in the community: like Gulp, Babelify, NPM, unit testing tools and how to tie them together.Is there any book where I could learn about this?
Submitted January 19, 2016 at 11:43AM by TedSnark
Submitted January 19, 2016 at 11:43AM by TedSnark
How to automatically copy files from npm package to local directory via postinstall script?
http://ift.tt/1n1PkAs
Submitted January 19, 2016 at 09:53AM by dmitri14_gmail_com
Submitted January 19, 2016 at 09:53AM by dmitri14_gmail_com
Started playing around with es7 and koa and made a to-do list app
http://ift.tt/1QaTBLU
Submitted January 19, 2016 at 09:05AM by matthova
Submitted January 19, 2016 at 09:05AM by matthova
Monday, 18 January 2016
Install node like a boss with nvm
http://ift.tt/1ZHOudW
Submitted January 19, 2016 at 07:34AM by panzerdp
Submitted January 19, 2016 at 07:34AM by panzerdp
Learn How to Dockerize a Node.js Web App
http://ift.tt/1NhPhG0
Submitted January 19, 2016 at 06:39AM by DavidMiller101
Submitted January 19, 2016 at 06:39AM by DavidMiller101
Catch-all email hosting?
I'm working on an email relay similar to craigslist's email relay which needs to catch all emails sent to a domain and then forward to a corresponding email address. I already have code for listening to a mailbox and then forwarding as needed but just need an email server. I really don't want to host the email server myself as I'm not comfortable with email server setup so I need a hosted solution. Initially it'll just be for development/testing but eventually I'll need one for production. I'm ok with switch hosts for a more economical one when it comes time for production.Anyone have any recommendations?I'm sure this isn't quite the right subreddit, so you're welcome to direct me to right subreddit.
Submitted January 19, 2016 at 01:20AM by mrspeeds
Submitted January 19, 2016 at 01:20AM by mrspeeds
Having trouble deciding on stack for next project
Basically, I am building a social media type app for fun, and as a learning experience, but i am having trouble deciding on what tools to use.I have experimented with bower, npm, browserify, gulp, grunt, webpack, express.js, koa.js, sails, react, meteor.js, riot.js, and now vue.js, and holy fuck am i overwhelmed. I really like the idea of javascript fullstack.i have ruled out vue.js, because of the lack of server side rendering, and I am leaning towards using riot.js, because tbh i dislike react.js. I am leaning towards using sails, because i come from a rails background, but I would like to build a SPA on top of a REST api, with server side rendering. I dislike the idea of using mongo, so I will use postgres with some stuff being json.Does this sound sane? what is your idea stack for node.js? Does sails + riot.js + postgres seem like a reasonable stack?
Submitted January 19, 2016 at 12:20AM by phat4life
Submitted January 19, 2016 at 12:20AM by phat4life
whereami
http://ift.tt/1ZIlyTb
Submitted January 18, 2016 at 11:27PM by rafaelrinaldi
Submitted January 18, 2016 at 11:27PM by rafaelrinaldi
Dot notation utility (tiny, without deps)
http://ift.tt/1JVP00P
Submitted January 18, 2016 at 11:19PM by renatorib
Submitted January 18, 2016 at 11:19PM by renatorib
too much async
before i get too far into this, here's the situation... i've inherited a server app and the job to add a feature. i'm pretty limited in how much i can change the architecture. client connects to server, makes its request, and expects a final response. the server takes the request and now has to connect to another server and start a process, which runs asynchronously, but can call back to my server when its done with the results. which somehow have to get back to the original process so they can be sent back to the client. i hope that makes sense. i'm not expecting any miracles, but some ideas on how to maybe approach this would be greatly appreciated.
Submitted January 18, 2016 at 11:06PM by drouu
Submitted January 18, 2016 at 11:06PM by drouu
Help with code for project (node noob)
Im not the strongest programmer in the world, just wondering if anyone can give me a hand/tell me where i've gone wrong. My project is supposed to be a chat room that can send images, it worked fine before I tried to do the image sharing.HTML
App/Servervar fs = require('fs'), path = require('path'), io = require('socket.io'), static = require('node-static'), express = require('express'), app = express(), server = require('http').createServer(app); server.listen(3000); var file = new static.Server(path.join(__dirname, '..', 'public')); app.get('/', function(req, res){ res.sendfile(__dirname + '/index.html'); }); app.use(express.static(path.join(__dirname, 'public'))); function app(req, res) { file.serve(req, res); }; var io = io.listen(app), nicknames = []; //recieving event on the server side io.sockets.on('connection', function(socket){ socket.on('send message', function(data){ socket.broadcast.emit('new message', {msg: data, nick: socket.nickname}); }); socket.on('image message', function(data){ socket.broadcast.emit('image message', {msg: data, nick: socket.nickname}); }); socket.on('new user', function(data, callback){ if (nicknames.indexOf(data) != -1){ callback(false); } else{ callback(true); socket.nickname = data; nicknames.push(socket.nickname); updateNicknames(); } //?// }); function updateNicknames(){ io.sockets.emit('usernames', nicknames); } socket.on('disconnect', function(data){ if(!socket.nickname) return; nicknames.splice(nicknames.indexOf(socket.nickname), 1); updateNicknames(); }); }); Messagingvar socket = io.connect(); var $nickForm = $('#nickInput'); var $nickError = $('#nickError'); var $nickBox = $('#nickname'); var $users = $('#users'); var $messageForm = $('#sendMessage'); var $messageBox = $('#message'); var $chat = $('#chat'); var $sendImage = $('#sendFile'); socket.on('new message', message); socket.on('image message', image); //nickname input $nickForm.submit(function(e){ e.preventDefault(); socket.emit('new user', $nickBox.val(), function(data){ if(data){ $('#nickDiv').hide(); $('#chatDiv').show(); } else{ $nickError.html('That username is already taken, try again'); } }); $nickBox.val(' '); }); socket.on('usernames', function(data){ var html = ''; for(i=0; i < data.length; i++){ html += data[i] + '
' } $users.html(html); }); // text $messageForm.submit(function(e){ e.preventDefault(); socket.emit('new message', $messageBox.val()); $messageBox.val(''); }); socket.on('new message', function(data){ $chat.append('' + data.nick + ': ' + data.msg +
"); }); e.preventDefault(); socket.emit('send message', $messageBox.val()); $messageBox.val(''); }); // image $sendImage.bind('change',function(e){ var data = e.orginalEvent.target.files[0]; var reader = new FileReader(); reader.onload = function(evt){ image('me', evt.target.result); socket.emit('image message', evt.target.result); }; reader.readAsDataURL(data); }); socket.on('image message', function(base64Image){ $chat.append('' + data.nick + ': ' + data.msg + "
", ''); };
Submitted January 18, 2016 at 10:34PM by Jakewright0409
Enter a username
' } $users.html(html); }); // text $messageForm.submit(function(e){ e.preventDefault(); socket.emit('new message', $messageBox.val()); $messageBox.val(''); }); socket.on('new message', function(data){ $chat.append('' + data.nick + ': ' + data.msg +
"); }); e.preventDefault(); socket.emit('send message', $messageBox.val()); $messageBox.val(''); }); // image $sendImage.bind('change',function(e){ var data = e.orginalEvent.target.files[0]; var reader = new FileReader(); reader.onload = function(evt){ image('me', evt.target.result); socket.emit('image message', evt.target.result); }; reader.readAsDataURL(data); }); socket.on('image message', function(base64Image){ $chat.append('' + data.nick + ': ' + data.msg + "
", ''); };
Submitted January 18, 2016 at 10:34PM by Jakewright0409
modhelp: a cli for viewing module readmes in the terminal, with syntax highlighting and built-in pager
http://ift.tt/1zmQ0ne
Submitted January 18, 2016 at 09:47PM by runvnc
Submitted January 18, 2016 at 09:47PM by runvnc
Awesome list of great, small, focused NPM modules.
http://ift.tt/1Pwdb2c
Submitted January 18, 2016 at 09:13PM by parro-it
Submitted January 18, 2016 at 09:13PM by parro-it
JS/Jade: how to update a page based on a dropdown?
Note up front that I am just learning JS and this might be better in the JS subreddit, but I think there's a node/Jade-specific aspect so I thought I would start here. But there might be an obvious answer that I just don't know the terminology well enough to Google for.I have a page that looks like the following:form#formSetup (name="league_details",method="post",action="/addleaguedetails") select(name='league_select') each league in leagues option(value=league.id) #{league.name} option(value="-1") New input#inputName(type="text", placeholder="name", name="name", required="true") What I would like would be to have the input prefill with the name of the league that has been selected. One idea I had is that instead of passing in an array of leagues, I could pass in a map of index to league and use that index for the option value instead of the league id, so that i could more easily reference the selected league based on the selected option value, but I'm not sure if that's the best way or really how to make the input fields update when the select happens. Do I use a JS function or is there something Jade-specific for this?
Submitted January 18, 2016 at 07:26PM by mwilykat
Submitted January 18, 2016 at 07:26PM by mwilykat
Why you should use Koa instead of Express with Node.js
http://ift.tt/1Kngxmy
Submitted January 18, 2016 at 06:34PM by NodeMasterPro
Submitted January 18, 2016 at 06:34PM by NodeMasterPro
Objection.js + PostgreSQL: by the power of JSON queries
http://ift.tt/1Kn27TC
Submitted January 18, 2016 at 05:35PM by pkainulainen
Submitted January 18, 2016 at 05:35PM by pkainulainen
Build a container with a Node.js application
http://ift.tt/1P0jJde
Submitted January 18, 2016 at 03:47PM by dynamicallytyped
Submitted January 18, 2016 at 03:47PM by dynamicallytyped
Starter App using Angular Material, Nodejs, Express, Jade, SASS and Gulp
http://ift.tt/1JT53fD
Submitted January 18, 2016 at 01:35PM by AntHillMx
Submitted January 18, 2016 at 01:35PM by AntHillMx
Node.js: Tales From the Bcrypt
http://ift.tt/1JcgLCe
Submitted January 18, 2016 at 11:56AM by mockes
Submitted January 18, 2016 at 11:56AM by mockes
Let's Fix Node.js Buffer API
http://ift.tt/1ZAPX5C
Submitted January 18, 2016 at 12:00PM by wo1fgang
Submitted January 18, 2016 at 12:00PM by wo1fgang
Speed up npm install with a local registry to cache packages
http://ift.tt/1n69k54
Submitted January 18, 2016 at 08:17AM by nicgirault
Submitted January 18, 2016 at 08:17AM by nicgirault
Sunday, 17 January 2016
Hello, Nodal — Why We’re Building Node.js Servers for Everybody
http://ift.tt/1PkWg2g
Submitted January 18, 2016 at 07:32AM by keithwhor
Submitted January 18, 2016 at 07:32AM by keithwhor
Complex Authorisation in a node app
Hey, Let me just prefix this post in saying I am by no means an expert in node. I have just been playing around and built a couple toys and I am now building my first app that I am hoping to put into production and I would love some advice from more experienced programmers.So I am building an app. The DB I am using is mongo with mongoose as my ORM and my framework is hapijs.I have a pretty confusing authorisation structure that I need to implement which I am not sure if I can do with existing modules.So let's set out my structure.Users are part of "teams" within each team they have a role this role grants them specific privileges that allows them to access certain routes and carry out actions on data. For instance if they are an admin they can modify other users profiles and the team itself.A single user can be part of multiple teams and have a different role on each team.Then there are resources which are user created. A user can grant access to this resource to a role. This will allow all users within any teams that the creator is part of who are assigned that role to access the data, but only when they have that team as their "active one". Users can then also create finer grained access where they can grant a single user access to that resource.Now please let me know if I haven't explained myself properly. I understand it's pretty complex and confusing.The approach I am looking at to handle this is similar to how AWS handles IAM authorisation. Each resource has a document that specifies the specific actions roles or users can perform and the server checks this document on every request. There will then be a general policy document for the roles as a whole on actions they can perform.If I am going about this completely the wrong way please tell me. Thanks.
Submitted January 18, 2016 at 12:04AM by mrjonny2
Submitted January 18, 2016 at 12:04AM by mrjonny2
Help Needed: how are Express routes (REST)used to save to Mongo Databases?
I'm a bit new to this, but I'm afraid I'm missing a piece of information and hoping you can help me understand.Specifically, I'm working through the thinkster.io MEAN tutorial on the REST Routes portion. http://ift.tt/1OYaN8d works according to the tutorial, but I'm not understanding exactly how the second to last snippet works.router.post('/posts/:post/comments' function(req,res,next) { var comment = new Comment(req.body); comment.post = req.post; comment.save(function(err,comment) { if (err) {return next(err); } req.post.comments.push(comments); req.post.save(function(err, post) { if (err) {return next(err); } res.json(comment); }) }); }) Here's my understanding.A POST method on the URL /posts/:post/comments is encounteredA new comment variable is created from the Comment prototypeThe comment.post object is set to the req.post value (Help needed: is this thanks to express and the URL parameters?)comment has a "save" method which is handed a function.this function brings in the (express or mongo) error and the "comment" (from the POST method?)this function errors out and quits if "err" existsthe function pushes the parameter "comment" onto the comments array of the req.post object (Question: is this in the browser memory?)req.post.save is ran, which pushes the data in memory to mongo (right?), bringing any errors and the post (Help needed: Why are we saving the post and not the comment)this function will quit if "err" existsres.json(comment) (Help needed: This part is the most puzzling. So the response already has a JSON method that hands data to the server?Seriously, thank you for your help!TL;DR; Don't understand how express uses REST to save to mongo. Extra reading material is appreciated.
Submitted January 18, 2016 at 12:08AM by urbanscouter
Submitted January 18, 2016 at 12:08AM by urbanscouter
Did IBM's acquisition kill Express?
http://ift.tt/1PjZxig
Submitted January 17, 2016 at 09:04PM by Doctuh
Submitted January 17, 2016 at 09:04PM by Doctuh
What's the purpose/use of a "Collection" in Bookshelf.js
Hi everyone,I'm relatively new to node but I feel I got a good grasp of the main principles. I like the bookshelf ORM but I can't see to understand the purpose or use of Collections. What are they? What do they add to a model and how do they help with development?The Bookshelf documentation didn't really explain their purpose.
Submitted January 17, 2016 at 08:46PM by BooRadleyForever
Submitted January 17, 2016 at 08:46PM by BooRadleyForever
Is Express.js dying?
http://ift.tt/1TOHq8h
Submitted January 17, 2016 at 04:15PM by a0viedo
Submitted January 17, 2016 at 04:15PM by a0viedo
How to properly secure REST API?
I am developing a service which uses REST API on backend serving data to frontends on android, ios and web. Users can log in to this service either creating own user account or using facebook. Users can create data or read it. What are the best practices to secure api like this?Thanks.
Submitted January 17, 2016 at 02:53PM by Viped
Submitted January 17, 2016 at 02:53PM by Viped
How to Build a Node.js CLI that calls Apps Script Execution API
http://ift.tt/1WjzOMH
Submitted January 17, 2016 at 07:46AM by mockes
Submitted January 17, 2016 at 07:46AM by mockes
Saturday, 16 January 2016
Search known issues of all your modules at once
http://ift.tt/1SVHYuZ
Submitted January 17, 2016 at 07:05AM by szarringhalam
Submitted January 17, 2016 at 07:05AM by szarringhalam
adminMongo - A new open source web based admin interface for mongoDB
http://ift.tt/1PyNzBN
Submitted January 17, 2016 at 05:37AM by mrvautin
Submitted January 17, 2016 at 05:37AM by mrvautin
Learn how to create Node.js modules with ES2015
http://ift.tt/237tZGJ
Submitted January 17, 2016 at 04:34AM by dwaynecrooks
Submitted January 17, 2016 at 04:34AM by dwaynecrooks
Node begginer
Hi I'm learning Node, I know the basics of node with express, just learned how to serve static files, how to create an API, mongoose for mongodb, after learning all that I just noticed that I don't have any ideas, could yo suggest me an small project to start developing? edit: yea I misspelled beginner, I'm not a native speaker.
Submitted January 16, 2016 at 11:32PM by yeso126
Submitted January 16, 2016 at 11:32PM by yeso126
RSS nodes to text file
My goal is to send a new post to some chat when it appears in the rss, so I use feedparser to get the rss feed and I am trying to put it into the text file to compare if rss has differences, but I can't write it to file. For some reason fs.writefile doesn't work , can you show me how to do so on the example file in feedparser? Thanks!
Submitted January 16, 2016 at 08:37PM by Killa_
Submitted January 16, 2016 at 08:37PM by Killa_
What would you consider the best approach to develop a news organization's website using node and sepration of concerns?
I mostly build sites using Django which was originally developed for news organization's publishing needs, however with the advent of Node.js and API's I am considering an API centered approach, my concern is SEO.SEO is very important for news organizations and e-commerce (my other primary clients) and an API centered approach with separation of concerns involves a client app that probably uses javascript, this is all well and good, but we all know js frameworks and SEO require a lot of additional work e.g. (Phantom.js, Selenium, etc..)
Submitted January 16, 2016 at 07:33PM by jcferrans
Submitted January 16, 2016 at 07:33PM by jcferrans
Question regarding NodeJS multiple apps on AWS, do I store it on the root partition or on a mounted second volume?
Hey all, I'm just wondering if it's worth adding a second EBS volume to our instances to store the NodeJS application data, as opposed to storing it under /opt/$appname on the root partition.It makes sense to me to decouple the application from the OS in a scalable environment for flexibility but on the other side of the argument there is 'simplicity' by storing the app on the root partition.I know this is quite trivial but I'm just wondering if the benefits of another EBS volume are worth the trouble.This is a scalable NodeJS app running on Ubuntu 14.04.Thanks
Submitted January 16, 2016 at 06:16PM by techie_freelancer
Submitted January 16, 2016 at 06:16PM by techie_freelancer
Understanding Garbage Collection and Memory in Node.js
http://ift.tt/1RMuela
Submitted January 16, 2016 at 06:10PM by piterpolk
Submitted January 16, 2016 at 06:10PM by piterpolk
ModularJS, events based and modular framework
Hi, this a project i'm working on for many month. I think the project is mature enought to be public. Any feedback is very appreciated.
Submitted January 16, 2016 at 05:26PM by PIC-27
Submitted January 16, 2016 at 05:26PM by PIC-27
Topcoder just launched two contests related to a Nodejs app
You can find more information about the two contests here: Part 1 and Part 2They require you to enhance an existing Nodejs app
Submitted January 16, 2016 at 03:17PM by callmekatootie
Submitted January 16, 2016 at 03:17PM by callmekatootie
5 Reasons to Learn Redux
http://ift.tt/1RrR0Ag
Submitted January 16, 2016 at 01:32PM by dbuarque
Submitted January 16, 2016 at 01:32PM by dbuarque
Async, MySQL and connection limits
I'm using Bookshelf.js as ORM, using MySQL as database and async as async library.The following code only adds 1747 records into my database even though there are 2000 results in the array. Actually I use request library and fetch some data from a website, but I simplified it here, even if I remove the request part, I am not able to add more than 1747 records when I type curl http://localhost/async on the terminal and check the number of records in the db after a few seconds.What could be my problem? I edited my.cnf and increased max_allowed_packet like below.[mysqld] max_allowed_packet = 6400M Node.jsvar person = require('./models').person; app.get('/asynctest', function(req, res) { var people = []; for (var a = 18000; a < 20000; a++) { people.push("random url"); } async.mapLimit(people, 20, function(url, callback) { new person({ name: "YES", url: url }).save(); callback(); }); }); Here's my db.jsvar knex = require('knex')({ client: 'mysql', connection: { host: '127.0.0.1', port: 8889, user: 'root', password: 'root', database: 'mydbname', charset: 'utf8' }, pool: { min: 0, max: 100 } }); var db = require('bookshelf')(knex); module.exports = db; models.jsvar db = require('./db'); var person = db.Model.extend({ tableName: 'people' }); module.exports = { person : person };
Submitted January 16, 2016 at 09:48AM by laraveling
Submitted January 16, 2016 at 09:48AM by laraveling
Friday, 15 January 2016
Prevent executing "npm install " without `-S`, `-D`, `--save`, `--save-dev`, `-g` flags
http://ift.tt/1ZqSha8
Submitted January 16, 2016 at 07:31AM by ewnd9
Submitted January 16, 2016 at 07:31AM by ewnd9
Why programmers hate Javascript ?
Why Javascript is getting a lot of "hate" or a bad rep from a lot of programmers out there who are schooled if you want in others languages like C/C++, C#, Java, Perl, Python, Visual Basic etc ??
Submitted January 16, 2016 at 04:28AM by kevinmarenger
Submitted January 16, 2016 at 04:28AM by kevinmarenger
Non blocking image processing on a server?
If I had a server set up with Node and there was an admin backend where I could batch upload a bunch of images which would then be cropped, compressed, and resized automatically before being added to a relational database, would I need to be concerned with image processing blocking other Node processes?For example, if on this same system, several users could access several existing images at once through ajax calls/rest api, would there be a slowdown if images are currently being uploaded and processed?I imagine image processing would be cpu intensive so I'm wondering if Node would be a good candidate for this type of project or if it could be conceptually as easy asProcessImages(images,Callback){ //do processing here Callback(addTheseProcessedImageToDb) } AccessImagesViaGET(req,res)//not waiting for ProcessImages
Submitted January 16, 2016 at 12:42AM by keyer7
Submitted January 16, 2016 at 12:42AM by keyer7
Understanding garbage collection and hunting memory leaks
http://ift.tt/1OiNAgW
Submitted January 15, 2016 at 09:13PM by a0viedo
Submitted January 15, 2016 at 09:13PM by a0viedo
Node.js Async mapLimit and memory (Help)
http://ift.tt/1SSuMqE
Submitted January 15, 2016 at 08:09PM by laraveling
Submitted January 15, 2016 at 08:09PM by laraveling
Bitbucket's npm integration: a tale of three XHRs (x-post r/javascript)
http://ift.tt/1SM9VoS
Submitted January 15, 2016 at 05:38PM by kannonboy
Submitted January 15, 2016 at 05:38PM by kannonboy
SocketCluster framework v4
http://ift.tt/1le7Ggz
Submitted January 15, 2016 at 02:52PM by jonpress
Submitted January 15, 2016 at 02:52PM by jonpress
Learning node
I'm an android developer and recently started learning express node js. Honestly getting the learning ball rolling has been much much difficult compared to when i learned android. Most of the resources I found online are either not beginner friendly or they are incomplete for starters.I have come here to seek information about what kind of projects should i make for learning node. May be a list of example projects that beginners can do to learn.
Submitted January 15, 2016 at 02:20PM by fapste
Submitted January 15, 2016 at 02:20PM by fapste
How do I create multiple users (firebase) and restrict a page using a custom modal (using http-auth rn)?
Basically what the title says. Volunteering and they want that kind of system where one master account can edit the hours everyone has, and everyone else can view what they have. Help is appreciated :D.
Submitted January 15, 2016 at 02:00PM by dangerousdesi221
Submitted January 15, 2016 at 02:00PM by dangerousdesi221
Accessing Exchange 2010/ 2013 calendar in node.js
http://ift.tt/1QaBk3h
Submitted January 15, 2016 at 11:34AM by ConnectingSoftware
Submitted January 15, 2016 at 11:34AM by ConnectingSoftware
Waiting for a query to return?
I'm working on my first project with node.js and Jade. I have a router.post target that does some parsing of input, then does a MySQL query, then based on the result of that it might do a HTTP request and some parsing of the page content, and finally depending on the results of all of those it should decide what page to forward to.However, it looks like what's happening is that it starts the database query but doesn't wait for a response before continuing, so even if the DB/HTTP work would cause it to go to a page other than the default, it goes to the default and then completes the DB/HTTP work. I can see in my console logs something like:begin text parsing redirect to default GET /finalpage begin db query db data received begin http request http data received http data parse result What can I do to make the processing run serially, or is there some other way I should be architecting this?
Submitted January 15, 2016 at 10:33AM by mwilykat
Submitted January 15, 2016 at 10:33AM by mwilykat
My new template language, for emmet one page apps
Hello from /r/javascript!I just published the second version of my weekend project emmetp, a emmet template language.I haven't thoroughly tested this version and could use a few testers, also would like some criticisms, optimizations and code review if anyone wants to. I'm using it as a code sample while applying, but tbh I think it's too regex-heavy.src: http://ift.tt/233XOYJ: http://ift.tt/1Kh1rz3: npm install emmetp -gWhat does it do? Its a template language based on the emmet sublime plugin. And you can inline JS or es6 now.Why? Mostly for one-page apps and code golf, or for mocking up a prototype/quick hack. When the project grows just move the JS out and push TAB to expand the emmet, right? right.Example:! #app span{hello world} button.btn1+button.btn2 #footer>div>span>label{or just one line} script& console.log('inline js') - script&coffee: console.log "or coffeescript/babel" - That should output a fully functional HTML file with working javascript (and coffeescript compiled js).If you want to try it out you can npm install emmetp -g.
Submitted January 15, 2016 at 09:51AM by mc_hammerd
Submitted January 15, 2016 at 09:51AM by mc_hammerd
TeleAPI update: support inline bots api in telegram
http://ift.tt/1lcVXii
Submitted January 15, 2016 at 07:56AM by nof1000
Submitted January 15, 2016 at 07:56AM by nof1000
Thursday, 14 January 2016
Node.js Buffer knows everything – your traffic, sources, keys and configs
http://ift.tt/1Q6HuRQ
Submitted January 15, 2016 at 04:24AM by wo1fgang
Submitted January 15, 2016 at 04:24AM by wo1fgang
How to thunkify Promises with Bookshelf?
Alright, the title may be a bit vague, but I couldn't come up with the right keywords to find this using Google. I am writing a piece of software where I use yield whenever necessary (well, not necessarily, but in this case it makes my code much easier to read and much cleaner). Anyway, libraries that don't support it, I thunkify by using thunkify (http://ift.tt/1QF0V3i). So far, so good.But Bookshelf has a different approach, because the functions are 'chained'. For example, say we have:User.where('id', 1).fetch({withRelated: ['posts.tags']}).then(function(user) {How do we thunkify this (if possible at all)? Do we use thunkify(User.where.fetch.then)?
Submitted January 14, 2016 at 10:50PM by itsYourDeveloper
Submitted January 14, 2016 at 10:50PM by itsYourDeveloper
Help with long running commandline node process
Hey there, I'm looking to monitor for a few processing events, like SIGKILL, and respond to them. The application does nothing else. So I have something like:process.on('SIGINT', function(){//stuff}; process.on('SIGKILL', function(){//stuff}; And I want the process to continue running. I've seen a few posibilities like:setInterval(function(){}, Math.POSITIVE_INFINITY); require('net').createServer().listen(); // Grabs random port? Is there a preferred way for me to do this? This is intended to be in a docker container and to inform a clustering tool that the host is going down via an api call.
Submitted January 14, 2016 at 09:57PM by fallen77
Submitted January 14, 2016 at 09:57PM by fallen77
Chromium with native casting support--does this mean that Electron apps will also receive this functionality?
http://ift.tt/1N5ppNF
Submitted January 14, 2016 at 07:29PM by ThrowinAwayTheDay
Submitted January 14, 2016 at 07:29PM by ThrowinAwayTheDay
How do you know what to make open source and what not to?
I have a project I've been working on for about a month that I've used to teach myself web development. I have all my passwords and database configs in a separate file that I call when used, but I can't help but wonder if I'm missing anything that should be left out of the open source. How would I know if something would make me vulnerable if it was open sourced?
Submitted January 14, 2016 at 06:45PM by dadschool
Submitted January 14, 2016 at 06:45PM by dadschool
Factory Function Pattern In-Depth
http://ift.tt/1mYxbne
Submitted January 14, 2016 at 05:10PM by Pyrolistical
Submitted January 14, 2016 at 05:10PM by Pyrolistical
How to require modules without specifying a path
I use browserify for the front-end which means that I sometimes share packages between the server and front-end. This means that my "Universal JS" libraries are separate from the rest of the code.Here's what my dir looks like:/lib //for universal /web //for front-end /server //for server now, whenever I'm deep in the front-end, going back to /lib is a pain. The requires pretty much look like ../../../lib/numberLib. Same with the server.Is there any way to specify custom aliased libraries so that I could just do numberLib and it'd require that specific library?
Submitted January 14, 2016 at 04:29PM by nostupidquestionsdev
Submitted January 14, 2016 at 04:29PM by nostupidquestionsdev
Looking for Open Source collaboration on a Well-Featured and Well-Documented SocialMedia Boilerplate for React/Relay/Express/Passport app
Hi all,If you want to get hands-on with React/Relay and NodeJS you are welcome to join me on this endeavor.http://ift.tt/1OkrE3B backstory:I've been working on a lot of different projects with ReactJS, GraphQL, Relay, and Express and I've come to a point to where I'm tired of copy/pasting from different projects and want to create a boilerplate that is inspired heavily from Sahat's "Hackathon Starter"What is the stack?This is a NodeJS Stack that uses packages that cover DevOps, Server, and Client. I have broken them down below...DevOps Stack:MochaGulp (for SOME of the tasks, majority are using npm scripts)Babel stage 0Browserify (client side)eslintflowTypePhantomJS (not fully implemented yet)Custom watch scriptMaster config file for easy deploymentPM2 deployment configuration (not fully implemented)Azure (Not implemented yet)Heroku (Not implemented yet)Looking for more cloud based configs as well for later releaseServerside Stack:Express v4Passport.js with oauth/oauth2GraphQLSequelize ORM using SQLite3 databaseSession-File-StoreClientside Stack:React BootstrapReactAlt (flux implementation)React-RouterRelay.js and React-Router-RelaySuperagent for REST supportValidationLooking for immutability (considering deepfreeze)Considering ReduxStatic page reader for static pages made with markdownWhat is already done?I created a custom watch script that intelligently updates files for server or client, lints and runs unit tests.PM2 deploymentPassport local authenticationSignup / Login formsStatic page controllerMost of DevOpsMost of Serverside (just need to add oAuth2 authentication)Quick start guideClientside skeletonSQL Database SchemaGraphQL Schema (90% done)Roadmap:For the immediate future, I have this roadmap.. there is much more to come though as we continue.Add 3rd party API demos to showcase oAuth2 AuthorizationImplement oAuth2 Ajax login (can follow current passport local pattern)Implement RelayJS demosImplement profile page dashboardImplement following (people follow other people)Really good documentation / tutorialsYou can find the Github Repo here: http://ift.tt/1OkrGIN you want to join up, let me know what you need. IF you find an impedance with joining, please ask questions so let's make it easy to contribute. This is open source.Thanks!!Matt
Submitted January 14, 2016 at 04:11PM by tonechild
Submitted January 14, 2016 at 04:11PM by tonechild
Can someone help me understand what this means?
I am unfamiliar with node and js and I am not fully understanding what this bit of code is doing.var serialPort = require("serialport"); var SerialPort = serialPort.SerialPort; I understand that it is trying to initialize the Serial Port, but is there anymore detail that someone could provide? What is happening in the background of node.js?
Submitted January 14, 2016 at 03:59PM by oxgtu
Submitted January 14, 2016 at 03:59PM by oxgtu
Simple-restify: hassle free node server creation
http://ift.tt/1Q8iRUX
Submitted January 14, 2016 at 03:50PM by tomtaub
Submitted January 14, 2016 at 03:50PM by tomtaub
TIL that npm exposes a $npm_package_${var} environment variable
You can do things likenode server.js --name=$npm_package_nameand it will replace $npm_package_name with that name value in the package.jsonIf you have a nested object like the scripts object you can just use an underscore _ to reference it like $npm_package_scripts_testSeems useful and there's also this
Submitted January 14, 2016 at 02:52PM by mkmoshe
Submitted January 14, 2016 at 02:52PM by mkmoshe
Wednesday, 13 January 2016
Node.js Help
Hello everybody. I am thinking about creating a website to make you find lobbies for CSGO. People will be able to upload their lobby join code and add a text saying which ranks are allowed to join once every 15 minutes. I am experienced in building websites in HTML, CSS and Js, but don't get Node.js, I have seen a lot of videos about Node but I don't understand how I could do something like that with Node. If anybody could help me or can tell me a good place to learn Node, it would be appreciated a lot.
Submitted January 14, 2016 at 12:02AM by timgfx
Submitted January 14, 2016 at 12:02AM by timgfx
Webworkers and Atom
Hello,I've been using PhpStorm and WebStorm for the last two years, but mostly PhpStorm. I decided to move to Atom and started using a package called atom-ternjs, but it's very slow (older versions work fast enough but newer versions are very slow) and laggy. http://ift.tt/1mWXQRd's a warning, though, but I need to be able to get autocompletion for every package I added to my project, like asyc, bookshelfjs, cheerio, request, etc."loadEagerly is expensive. Do not add paths like node_modules."I'm not sure whether it's possible or not, but here's an idea. As far as I understand, this module works dynamically and it's the main reason it gets slow if there are lots of folders to scan.Would it possible to create a module (or modify this module) to make it work in a way that it creates its autocomplete index for every X minutes (or manually) so suggestions can be fetched from a static file and performance will be higher? That's my guess, though.If it is possible to achieve that, what would be the roadmap I should follow?I'm not very good at Node.js, but I'd like to solve that problem because I want to continue using Atom.
Submitted January 13, 2016 at 11:50PM by laraveling
Submitted January 13, 2016 at 11:50PM by laraveling
Bookshelf - JavaScript ORM for Node.js
http://bookshelfjs.org/
Submitted January 13, 2016 at 09:02PM by dynamicallytyped
Submitted January 13, 2016 at 09:02PM by dynamicallytyped
How should I install and use multiple versions of Node on the same production machine? Is it a dumb idea?
I know about n,nave and npm but I think that those are intended for development/testing.Our requirement is that we be able to have more than one version of Node running on a production machine. For instance, I might want an Express app running on Node 4. Also a Koa app running on Node 5. Also a HapiJS API running on Node 6.I don't know that nvm doesn't do this, but since it's a shell script my intuition says it won't. Same for nave and n. Am I wrong?Also, if this is an awful idea feel free to say so.Docker is not an option. Long story. It may be available in the future.I posted this on SO too but I suspect it will be closed for being opinion based.
Submitted January 13, 2016 at 08:39PM by jdub_pdx
Submitted January 13, 2016 at 08:39PM by jdub_pdx
Awesome npm articles, tools, and tips
http://ift.tt/1ZuEZyD
Submitted January 13, 2016 at 07:45PM by sindresorhus
Submitted January 13, 2016 at 07:45PM by sindresorhus
Node orm2 reviews? Anything I should watch out for?
Hello all, I've just started a project and I've began using ORM2 as my ORM http://ift.tt/1mZnJ3v the provided docs are pretty well done, most tutorials and examples use Sequelize or other ORMS.So I'm curious, have others used ORM2 before? How has your experience been? Anything I should watch out for?
Submitted January 13, 2016 at 06:48PM by TLI5
Submitted January 13, 2016 at 06:48PM by TLI5
Noob here: using template to provide link?
so i am using swig-email-template and want to provide a link.I am not able to follow their github page instruction to provide link.(more specifically rewriteurl options.). if someone could have a look and explain me how to provide a link in my template. http://ift.tt/1P1covZ
Submitted January 13, 2016 at 05:59PM by isachinm
Submitted January 13, 2016 at 05:59PM by isachinm
ChakraCore open sourced
http://ift.tt/1mZ6fUW
Submitted January 13, 2016 at 05:38PM by a0viedo
Submitted January 13, 2016 at 05:38PM by a0viedo
Which framework to use for my first node project?
Hi y'all, I've been working as a frontend developer for almost 2 years now; I'm about to start a new project (degree for college) using Angular 2 and Node on the backend, and a SQL DB.My question is which framework should I choose? I've been looking into Express and Loopback but Loopback seems to do too much magic and I want to learn as much as I can regarding backend.Thanks!
Submitted January 13, 2016 at 04:12PM by shortfuse07
Submitted January 13, 2016 at 04:12PM by shortfuse07
Real Time Temperature Logging With Arduino, NodeJS and Plotly!
http://ift.tt/22Wv2t1
Submitted January 13, 2016 at 03:27PM by jstuartmill
Submitted January 13, 2016 at 03:27PM by jstuartmill
Best app monitoring service for multi instance clustered app?
Hi, I implemented a single page site with the backend using socket.io and wrote my own server -> server redis pub/sub messaging solution. The state of my system is synced using MySQL.I'm getting to the end of the debugging stage and will soon put it into production and deploy into digitalocean or EC2.I hear alot of buzz of different services like newrelic and some other logging services that you can include into your apps to monitor the system on the web.My question is, what service or combination of them would be best to include for a system like this to work out final bugs with some actual user testers?
Submitted January 13, 2016 at 02:52PM by Figuringoutlifeman
Submitted January 13, 2016 at 02:52PM by Figuringoutlifeman
Hi guys, here's an awesome way to seamlessly monitor node.js application logs with a Winston appender - Let me know what you think
http://ift.tt/1P0J1K7
Submitted January 13, 2016 at 01:06PM by ArielAssaraf
Submitted January 13, 2016 at 01:06PM by ArielAssaraf
An awesome speech recognition API service to decode audio to text with Node.js
http://ift.tt/1J2vXBJ
Submitted January 13, 2016 at 11:47AM by wo1fgang
Submitted January 13, 2016 at 11:47AM by wo1fgang
New to Node. Looking for a sample app that will capture form fields to a MS SQL database.
Anyone know of such a thing? Thanks.
Submitted January 13, 2016 at 09:52AM by TonyIscariot
Submitted January 13, 2016 at 09:52AM by TonyIscariot
A templating engine that allows writing modules for it?
I basically want to have all my common views and partials like headers and such to be made into modules that I could import or include from the app's views much like you require a nodejs module from js files.Webpack allows such things but only for css and fonts and such files, but I want something for (pre-rendered) views.The upcoming Jade version 2.0 will likely have it, but I was wondering whether there's any other templating library that has had a plugin system all along?
Submitted January 13, 2016 at 09:55AM by laggingreflex
Submitted January 13, 2016 at 09:55AM by laggingreflex
A Precompile and data-independent template engine for nodejs.
http://ift.tt/1ZZHSEl
Submitted January 13, 2016 at 08:07AM by guankaishe
Submitted January 13, 2016 at 08:07AM by guankaishe
Tuesday, 12 January 2016
Returns a debounced version of the given function which waits to execute until its last call within a given time period
http://ift.tt/1KcFEZg
Submitted January 13, 2016 at 06:05AM by gregstallings
Submitted January 13, 2016 at 06:05AM by gregstallings
Node v5.4.1 (Stable) released
http://ift.tt/1OhoCgy
Submitted January 13, 2016 at 05:28AM by phelaz
Submitted January 13, 2016 at 05:28AM by phelaz
Reliable, performant node library for converting objects to (and from) xml and json?
No text found
Submitted January 13, 2016 at 05:08AM by SomeRandomBuddy
Submitted January 13, 2016 at 05:08AM by SomeRandomBuddy
Socket IO return error
I can't seem to figure out a good way to return errors in socket io.(Pardon the CoffeeScript)Currently, from the client side I'm emitting and expecting a callbacksocket.emit "recruit", type: "Spear", recruitAmount: spearMenRecruitCount, (callback) -> console.log "Callback: ", callback And on the server side I'm checking that all needed variables were sentsocket.on 'recruit', (data, cb) -> return cb error: true, message: "Missing Troop Recruit Count" if !data.recruitAmount? return cb error: true, message: "Missing Troop Recruit Type" if !data.type? return cb error: true, message: "Missing Village ID" if !data.villageID? Is there a better way to do this?
Submitted January 13, 2016 at 02:32AM by hego555
Submitted January 13, 2016 at 02:32AM by hego555
Cheerio web scraping (Help)
I got stuck somewhere while experimenting with Cheerio.Here's the DOM I'm dealing with. There are multiple table rows per table header.When I'm done with "iamhere" class, I need to extract a value from ineedthis, but I need to get that value from its source (first ineedthis when I keep looking for a ineedthis class above), so the way I go up through the dom should be iamhere > tr > ineedthis.How can I do that?
Submitted January 13, 2016 at 02:20AM by laraveling
Submitted January 13, 2016 at 02:20AM by laraveling
Need help on building an Express.js web app with CMS/blogging features
So, I need to write a mongodb powered Express.js web app. There will be many CRUD actions and actions fired upon events, but nothing I can't handle easily.My question is: is out there anything like a CMS/blogging module that I can run along with my web app so that I don't have to reinvent the wheel when I want to provide my app with common publishing features?In other words, I'll have this app with authentication, items management, calculations, etc. In addition to that, I'd like to have some simple web pages/content with common features like: new articles, new static pages, image uploading, wysiwyg editors, etc.I can obviously write all of them on my own but I would love to save time just "plugging-in" a module that will handle routes and views on its own to provide simple publishing features in my web app.Thank you everyone.
Submitted January 12, 2016 at 10:09PM by daliz
Submitted January 12, 2016 at 10:09PM by daliz
Monitoring your NodeJS app with Datadog
http://ift.tt/1PV4SzS
Submitted January 12, 2016 at 09:21PM by dbader
Submitted January 12, 2016 at 09:21PM by dbader
Getting Started with Node.js and MQTT
http://ift.tt/1nfmMUy
Submitted January 12, 2016 at 09:15PM by dynamicallytyped
Submitted January 12, 2016 at 09:15PM by dynamicallytyped
What is currently the way to go if you want to build a realtime, scalable app?
Hey friends. I am going to build an app, it will be a small, turn-based, real-time game. I want it to be scalable. I have couple of questions, can you give me your opinion?Load balancing with NGINX?What would you use as a wrapper? Forever? PM2? Phusion Passenger?What is the way to handle clustering?Are Websockets actually a viable choice or you better just use AJAX?If Websockets, what library or framework you would use? Keeping in mind you would like to scale both vertically and horizontally?Is SocketCluster a good choice?
Submitted January 12, 2016 at 06:07PM by _dufia
Submitted January 12, 2016 at 06:07PM by _dufia
Building a daemon app with Node using Microsoft Graph API
http://ift.tt/1SghO6F
Submitted January 12, 2016 at 04:57PM by BBQLays
Submitted January 12, 2016 at 04:57PM by BBQLays
Upgrading node.js on Windows without GUI access?
Hey allI have a website hosted on Azure, and only have non-administrative command line access to the underlying VM.The version of node is ancient, is is possible to upgrade in this restricted environment?
Submitted January 12, 2016 at 02:41PM by jmkni
Submitted January 12, 2016 at 02:41PM by jmkni
Learn how to configure a Couchbase Server with NodeJS and ES6/ES7
http://ift.tt/1N4wf5P
Submitted January 12, 2016 at 11:40AM by martinmicunda
Submitted January 12, 2016 at 11:40AM by martinmicunda
Debug Node.js code super easy
http://ift.tt/1J4Lv5I
Submitted January 12, 2016 at 09:33AM by dodo_number_1
Submitted January 12, 2016 at 09:33AM by dodo_number_1
Native node module in C?
I want to create some native node modules in C.I realize that I'll need to have some C++ wrappers. That's fine.What I really want to do is target Linux, OSX and Windows OR, alternatively, Node Webkit or Electron (since they're all capable of running on all three platforms anyways).I tried doing this in Windows and it blows chunks. I suppose it would be better if I could do it in Linux and cross compile to Windows and OSX. Is that possible?I've got an Ubuntu VM and an actual dedicated Ubuntu laptop I can use.
Submitted January 12, 2016 at 09:09AM by allthingseverywhere
Submitted January 12, 2016 at 09:09AM by allthingseverywhere
Monday, 11 January 2016
Better Async with Co
http://ift.tt/1SeQ2ri
Submitted January 12, 2016 at 02:06AM by badthingfactory
Submitted January 12, 2016 at 02:06AM by badthingfactory
TrendMicro built a node-powered application that exposes your passwords
http://ift.tt/1ZgKZ8Q
Submitted January 11, 2016 at 08:56PM by a0viedo
Submitted January 11, 2016 at 08:56PM by a0viedo
Trireme: running Node.js scripts inside Java
http://ift.tt/1m5fuMc
Submitted January 11, 2016 at 07:47PM by srw
Submitted January 11, 2016 at 07:47PM by srw
Resources to get started on IoTs
Hi /r/node/, Can you give me some recommendations on how to get started with node on the internet of things for someone with a basic grasp of javascript (callback functions, asynchronous programming etc.)?I am particularly interested in drones and the Intel Edison microprocessor which ships with node as one of its native languages. Thanks.
Submitted January 11, 2016 at 07:31PM by dtlv5813
Submitted January 11, 2016 at 07:31PM by dtlv5813
Setting up a Node.js Cluster
http://ift.tt/1Oe0P0T
Submitted January 11, 2016 at 07:08PM by dynamicallytyped
Submitted January 11, 2016 at 07:08PM by dynamicallytyped
WASM in V8
Google's Ben L. Titzer announced WASM in V8 earlier. http://ift.tt/1naBCeR . I am really curios for Node.js implications.
Submitted January 11, 2016 at 05:44PM by eljefederodeodeljefe
Submitted January 11, 2016 at 05:44PM by eljefederodeodeljefe
How to persist pm2 services on free tier of cloud9
http://ift.tt/1OKLFBR
Submitted January 11, 2016 at 03:51PM by self_refactor
Submitted January 11, 2016 at 03:51PM by self_refactor
Script to migrate from Pivotal Tracker to GitHub Issues
http://ift.tt/1SdoT81
Submitted January 11, 2016 at 01:58PM by yamadapc
Submitted January 11, 2016 at 01:58PM by yamadapc
CLI tool to execute shell commands in parallel. Based on GNU parallel command
http://ift.tt/1JFaVJg
Submitted January 11, 2016 at 01:37PM by flesler
Submitted January 11, 2016 at 01:37PM by flesler
[node] Ex-girlfriend fucks with everyone! I even found it online sex dating.
http://ift.tt/1K8Qwra
Submitted January 11, 2016 at 01:18PM by bragev16794
Submitted January 11, 2016 at 01:18PM by bragev16794
Is your redis server safe? A project written in node
http://ift.tt/1K8FjGW
Submitted January 11, 2016 at 12:01PM by mjcsmf
Submitted January 11, 2016 at 12:01PM by mjcsmf
A config driven NodeJS framework implementing json:api
http://ift.tt/1RFMfSk
Submitted January 11, 2016 at 12:11PM by theninj4
Submitted January 11, 2016 at 12:11PM by theninj4
Introduction to Nodal (Part 3): User Authentication with Access Tokens
https://www.youtube.com/watch?v=WIjSA3-E42I
Submitted January 11, 2016 at 08:33AM by keithwhor
Submitted January 11, 2016 at 08:33AM by keithwhor
Sunday, 10 January 2016
Best way to learn professional node?
Hey everyone,I'm looking for resources on learning node that are geared toward programmers looking to learn a new platform. It seems like angular and express are the most used frameworks for back-end and front-end development.The problem I am having is that all the books I have found seem to be outdated and rely on old version of modules.All the online tutorials are very simple and don't go in depth on what you need to learn to go into professional development. They also spend a lot of time explaining thing that developers should already know (like what references are).What resources do you recommend? How did you learn the best practices? Which frameworks should I start looking into first?
Submitted January 11, 2016 at 06:38AM by Nephyst
Submitted January 11, 2016 at 06:38AM by Nephyst
latestvid - A command-line tool to open the latest YouTube upload from any account.
http://ift.tt/22ULWs4
Submitted January 11, 2016 at 06:16AM by km97
Submitted January 11, 2016 at 06:16AM by km97
Performance monitoring and analysing
Hi guys,I am wondering what my options are to monitor and analyse the performance of NodeJS 4.x applications.I have tried: - Manually: these V8 CPU profiles do not show anything interesting except for a huge call stack. Maybe I am wrong and someone can point me in the right direction? - Newrelic: Only tells me if my server is going to die and how many requests. does not display any useful information. - Appdynamics: Only supports node 0.12, dead end. - Strongloop: Does not actually provide any extra information compared to export V8 CPU profiles myself and reading them in Chrome.Thanks!
Submitted January 11, 2016 at 04:10AM by GoutMaximum
Submitted January 11, 2016 at 04:10AM by GoutMaximum
Question regarding help towards a project
Is it against any forum rules if i post a project asking for what im doing wrong? Im horrific at node/socket and i feel like its a little thing im missing thats stopping my project working.
Submitted January 10, 2016 at 08:36PM by Jakewright0409
Submitted January 10, 2016 at 08:36PM by Jakewright0409
What image compression/resizing library do you use in Node.js?
lwip, jimp, imagemagick, sharp or something else? I'm trying sharp now...
Submitted January 10, 2016 at 05:48PM by phelaz
Submitted January 10, 2016 at 05:48PM by phelaz
[node] My name is Lorena. I - a nymphomaniac! I want to have sex.
http://ift.tt/1PQ0GkE
Submitted January 10, 2016 at 08:34AM by mortsi95100
Submitted January 10, 2016 at 08:34AM by mortsi95100
Saturday, 9 January 2016
node orm2 express middleware?
Hello all.If I have the following in my app.js of my express app:EDIT: I've provided a gist because no matter how much I try to embed code in a post using the 4 spaces of indent, it always show's up horribly like it looks below: http://ift.tt/1kWPsQq(orm.express(opts, { define: function (db, models, next) { db.load("./models/index", function (err) { if (err)throw err; db.sync(); console.log("DB Sync'd!") //console.log(models); console.log(db.models); }) next();} }))as suggested in: http://ift.tt/1Rtat3V and demonstrated in: http://ift.tt/1kWPrfs is it that I can't access my models when handling a route with (for example) req.db.models.user?The request doesn't even seem to get req.db (it's undefined)
Submitted January 10, 2016 at 05:27AM by TLI5
Submitted January 10, 2016 at 05:27AM by TLI5
Can you use socket.io scripts in an external jquery file?
I'm working with a node application using socket.io and express server. It's just a simple chat application that I am trying to learn these languages and framework with. My question is pretty simple, but I couldnt find anything on google about it. All of the socket.io and jquery in all the examples are in the actual HTML source file. I am doing it different, by putting the jquery in a separate file. Can I use socket.io in an external jQuery file? Like will this work:var socket = socket.io();socket.emit("some function", value, function(data)Because I can get it to work internally with the HTML file, but once I separate it, it stops working..but I dont know if this is because I am doing it wrong or if it will not work that way..Anyone have any experience with this? And I do have it in a 'public' folder with the css and jquery, and that works with node when I run the app. It is just when I try to use socket.io it stops working.Thank you for any help, I am still learning.
Submitted January 10, 2016 at 02:04AM by ryohazuki88
Submitted January 10, 2016 at 02:04AM by ryohazuki88
Beginner stuck getting very basic Express API working. Happy to paypal $30 to first person to help me fix my code.
Hi everyone!I've been learning node over the past few days. I've been stuck with this issue for a couple of days now and it's getting really frustrating. I'm sure it's very trivial.Here's the full code including migrations: http://ift.tt/1JCnlSo the routes are not working! When I call http://localhost:3000/ I get "Cannot GET /"I appreciate taking the time to help me out and would be happy to playpal $30 to first person who can get me to access the routes.Thanks :)
Submitted January 10, 2016 at 01:50AM by BooRadleyForever
Submitted January 10, 2016 at 01:50AM by BooRadleyForever
Node.js vs Phalcon
Hey!I was wondering what the pros and cons are of using node.js vs something like phalcon which is supposed to be really quick.http://ift.tt/1OHkqbe'm not sure how the performance would compare in between the two frameworks. IO takes a lot of processing time, and that's supposed to be quick in Phalcon since it's a C extension. It's definitely quicker than the other php frameworks, but I'm not sure how it compares to node.js. Is there somewhere were I can see benchmarks or something?Thanks!
Submitted January 10, 2016 at 01:01AM by scyphi
Submitted January 10, 2016 at 01:01AM by scyphi
E-commerce API based on express. Open-sourced code from my startup.
http://ift.tt/1PWsoyk
Submitted January 10, 2016 at 12:24AM by tomtaub
Submitted January 10, 2016 at 12:24AM by tomtaub
What architetture/framework for a management (realtime) game?
We are a young company that would develop a "management" sport game like Football Manager but on the web.We are looking for what software/architecture or framework use for game development. Actually we are considering only 2 alternatives:The MEAN Stack (but with SQL instead MongoDB)Meteor JSThe option 1:Advantages: Yes it is "more standard" option, we have some experience with angularJS for client frontend and ExpressJS for REST API on server with Sequelize and MySQL that's good for structured data.Disadvantages In our experience the development is more expensive and long becouse we need to duplicate and rewrite the "models" on client and server side and maintain these aligned. Another break point: what about realtime?The option 2Advantages: It is more actractive for us becouse Meteor seems to be better for real-time applications, for example games. The development should be more fast becouse we can use the same query language to fetch data on server and client without write or rewrite code.Disadvantages We never worked with Meteor and we should learn it. In addition Meteor does not support officially MySQL actually but we have a lot of structured data (players, teams etc) stored in a sql database. We have not a good experience with Mongo becouse of this we didn't think to an hybrid approac, but we are looking for an alternative like RethinkDB.The question is: what architecture/tecnologies would you use to obtain the best result in less time?
Submitted January 10, 2016 at 12:33AM by hadokee
Submitted January 10, 2016 at 12:33AM by hadokee
Subscribe to:
Posts (Atom)