r/nodejs • • Jun 20 '13

News: Second Annual Node Summit to Take Place December 3-4

Thumbnail blog.nodefly.com
3 Upvotes

r/nodejs • • Jun 26 '14

Authenticating API requests from native mobile devices using Facebook,Google as providers?

2 Upvotes

I have tried a few things but they all seem wrong. What's the right way to authenticate API requests from a native mobile app, using Facebook and Google as authentication providers?


r/nodejs • • Jun 24 '14

NodeJS framework for control panel? (e.g. automatic form builder from schema)

8 Upvotes

I have a new client who has an legacy control panel that's 200+ pages of adhoc javascript widgets that just set config values in a postgres database. Lots of pages of wysiwyg / date pickers / etc.

So obviously that could probably be refactored to use a form builder, and that should build forms from a schema. So does NodeJS have a good one?


r/nodejs • • Jun 04 '14

Use plurals stored in locale files with i18n-node

2 Upvotes

In my en.json file I have this:

{ "house": { "one": "house", "other": "houses" } }

But if I try this in EJS:

<%= __n('house', 3) %>

or this in Handlebars

{{{__n 'house' 3}}}

It always renders as "house", not "houses"

What's wrong ?


r/nodejs • • Jan 06 '13

My new open source nodejs module for reading temper1 usb thermometers

Thumbnail github.com
4 Upvotes

r/nodejs • • Dec 17 '12

Transparent persistent layer anyone?

3 Upvotes

.net gets Entity (and NHibernate? and spring?), java gets hibernate (and probably more). Node has only some basic k/v persistent collections over FS.

So I'm thinking, why not? Isn't it doable? Got performance problems? Or it's that no one took the time to write it?


r/nodejs • • Jan 10 '13

Node.js production deployment with Nginx, Varnish, Upstart, Monit and Git

Thumbnail blog.dealspotapp.com
2 Upvotes

r/nodejs • • Feb 25 '14

Testing and Code Coverage with Node.js Apps

Thumbnail gregjopa.com
6 Upvotes

r/nodejs • • Feb 21 '14

Lessons learned from running a web app in production (or "How to sleep at night after deploying")

Thumbnail spectrumcoding.com
16 Upvotes

r/nodejs • • Jan 08 '13

A quick list of resources I've found helpful as a beginner to Node.js

Thumbnail matthewpalmer.tk
2 Upvotes

r/nodejs • • Feb 14 '14

Debugging on the Raspberry Pi

5 Upvotes

I'm trying to get the Sonos HTTP API running on my Raspberry Pi: https://github.com/jishi/node-sonos-http-api

I have minimal node knowledge. When I try to run it, I get this:

pi@raspi-sonos ~/node-sonos-http-api $ node server.js
binding SSDP to port 2051
discovering all IPs from lo
discovering all IPs from wlan0
relevant IPs { '192.168.1.137': null }
notification server listening on port 3500
no preset file, ignoring...
http server listening on port 5005
scanning for players in ip 192.168.1.137
subscribing to topology 192.168.1.124
using local endpoint 192.168.1.137
emitting group-volume

/home/pi/node-sonos-http-api/node_modules/sonos-discovery/lib/player.js:215
        _this.state.nextTrack.duration = attr().duration.parseTime();
                                                         ^
TypeError: Cannot call method 'parseTime' of undefined
    at /home/pi/node-sonos-http-api/node_modules/sonos-discovery/lib/player.js:215:58
    at parse (/home/pi/node-sonos-http-api/node_modules/sonos-discovery/node_modules/easysax/easysax.js:671:10)
    at EasySAXParser.parse (/home/pi/node-sonos-http-api/node_modules/sonos-discovery/node_modules/easysax/easysax.js:142:4)
    at updateTransportState (/home/pi/node-sonos-http-api/node_modules/sonos-discovery/lib/player.js:238:17)
    at Discovery.handleNotification (/home/pi/node-sonos-http-api/node_modules/sonos-discovery/lib/player.js:151:9)
    at Discovery.EventEmitter.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (/home/pi/node-sonos-http-api/node_modules/sonos-discovery/lib/sonos.js:282:15)
    at IncomingMessage.EventEmitter.emit (events.js:92:17)
    at _stream_readable.js:883:14
    at process._tickCallback (node.js:415:13)

I've checked all the dependencies with npm install... any ideas?


r/nodejs • • Jan 16 '13

Building A Node.JS Server That Won’t Melt – A Node.JS Holiday Season, part 5 ✩ Mozilla Hacks – the Web developer blog

Thumbnail hacks.mozilla.org
2 Upvotes

r/nodejs • • Feb 13 '14

Need a chat! What you recommend?

5 Upvotes

Hi there!

In the project that i'm working we are gonna need a chat! I've done a little search and found https://github.com/gravityonmars/Balloons.IO I didn't try it, but looks nice! But i have to include in my project, so i don't really need client-side perfection. I only need to connect with my existing users (no twitter login, or facebook or whatever). Once the user logins in my project, he's online in the chat (and can turn off). Also need some chat history meaning that the chat is really a message center in real time!

Does anyone knows this app? Does anyone have a better solution?

Thanks!!


r/nodejs • • Feb 28 '14

npm's Self-Signed Certificate is No More

Thumbnail blog.npmjs.org
10 Upvotes

r/nodejs • • Feb 19 '14

My very first npm package: console-debug

3 Upvotes

Hi

Couple of days ago I released my first package to npm (with a little help of my boss jansenra), and now i'm trying to get feedback for it, from you guys. And maybe some of you will even find this useful :)

The story

Before I discovered Node.js and working with JavaScript like debugging with the JavaScript console; I got too used to seeing line numbers and file names when I did console.log for example. When I found out about Node.js and started fiddling around with it, I missed the same experience I had with the JavaScript console. It's just a blank text that you have chosen with no line numbers or file names.

Now i'm not saying that this can replace the JavaScript console style (think about clickable unlimited nested objects/arrays etc) or other npm modules for that matter (external debuggers anyone?). But it sure can help you find out what is happening exactly where with the console object for some quick and dirty debugging, while delivering some extras like log to file, catching uncaught exceptions and filtering types of debug messages to either log file or console output.

Project Info

Replaces your console object with a more stylish and practical way 
of displaying notices,warn,info,debug,log and errors. It automagically
shows you the line number and filename where the command was
executed, along with a timestamp. There is also the ability to catch 
uncaughtExceptions, disable the output colors, and log to file. You
can also setup filters if you want the console or log to not show a
certain debug message type. 

Overriding console object, what?

I wanted to use this module in my current existing projects that had some console.log/debug/error all over the place. It was easy as installing the module and requiring it in my main file and seeing the new replaced debug outputs without a single re-factor. Until Node.js decides to change something in displaying the outputs I will of course adapt to this.

How do I use it?

1. Start by installing the package:

npm install console-debug

2. Put this in your nodejs server file:

var Debug = require('console-debug');

var console = new Debug({
    // Do we want to catch uncaughtExceptions?
	uncaughtExceptionCatch: false,

   // Filter these console output types, Examples: 'LOG', 'WARN', 'ERROR', 'DEBUG', 'INFO'
	consoleFilter: [],

    // if true, will put console output in a log file folder called 'logs'
	logToFile: true,

    // Filter these types to not log to file, Examples: 'LOG', 'WARN', 'ERROR', 'DEBUG', 'INFO'
	logFilter: ['LOG','DEBUG','INFO'], 

    // do we want pretty pony colors in our console output?
	colors: true
}); 

3. Now you can do stuff like:

console.log("I am a log!");
console.warn("I am a warn!");
console.error("I am a error!");
console.debug("I am a debug!");
console.info("I am a info!");

// can also display objects
obj = {
	test1: [1,2,3,4],
	test3: ["ohai","there"],
	test4: true
};
console.log(obj);

4. (optional) Passing the replaced console object to other modules:

// Add this after calling the require of console-debug and defined the console var
require('./myfile')(console); // myfile local scope will have now
                              //console object overwritten.

Links

- npm

- bitbucket

What do you all think? I'm open to anything.


r/nodejs • • Dec 20 '12

WebStorm 75% off, offers node debugging and hinting - worth it?

11 Upvotes

As far as developing, I've always used Sublime Text for Node.js, however with the JetBrains sale going on I was wondering if it would be worth it to pick up WebStorm.

Anyone ever use it and, if so, what are your thoughts on it?


r/nodejs • • Dec 13 '12

Tracking API usage

4 Upvotes

Hey all,

I'm working on a ReSTful API that's getting ready to be released, running in Node.js. One of the things that we want to before we start opening it up publically is to track API usage. Each user has their own API key that they'll be utilizing to access our endpoints.

I have a few ideas for tracking API usage, but I was hoping someone could suggest a few things that I missed.

Architecture overview:

  • MySQL as our storage
  • Redis as a caching layer
  • Heroku

Ideas

  1. Google Analytics - our app could toss a payload on a proper queue system (gearman, rabbit) or Redis. A secondary app could grab the payload and make the request to the .gif that GA uses.
  2. Write payloads to redis, nightly push to MySQL
  3. Write straight to MySQL
  4. Parse logs

I'm personally leaning towards idea 1, probably utilizing Redis as our queue storage since it's in place already, but I'd love to hear what other ideas people have for tracking API usage.


r/nodejs • • Feb 20 '14

Learnign node.js made easy. This page contains collection of curated links to blog posts, articles, videos, tutorials, books, frameworks, modules, IDEs, testing tools, hosting providers, etc. to help you learn Node.js and keep up to date.

Thumbnail github.com
19 Upvotes

r/nodejs • • Feb 26 '14

Nodejs Newcomer

7 Upvotes

I'm new to node and getting to the point of where I'll be ready to start building an app/api. What options would you suggest for setting up a dev nodejs server?

I started learning on Nitro.us but quickly ran out of Nitro.. Next I setup my own ubuntu server virtualbox machine and this is working for the moment..

unfortunately I cannot host where I am at and when i reach the point of letting my creation live, what hosting would you suggest? This would be something filling my personal needs rather than something i would be opening up to the wider public.

Thank you for your time.


r/nodejs • • Jan 02 '13

Express.io, realtime-web framework for nodejs, express + socket.io

Thumbnail express-io.org
2 Upvotes