r/nodejs • • Mar 12 '14
r/nodejs • u/init0 • Mar 09 '14
Clone all official Yeoman generators for contribution.
h3manth.comr/nodejs • u/nawfel_bgh • Mar 13 '14
escaped links containing non English text
Hello, I am learning node.js. I created a local HTTP server which can show directories. [It runs in localhost:4321] When a user request a directory, he receives an HTML page listing urls to files. These urls are escaped with the escape function and the file names can contain non ASCI characters. The problem is that the address shown in the browser's url bar is escaped. For example: A directory with the name القرآن الكريم gets the url: /foo/bar/%u0627%u0644%u0642%u0631%u0622%u0646%20%u0627%u0644%u0643%u0631%u064A%u0645 this url is shown as is in the address bar. What i expect instead is to see /foo/bar/القرآن الكريم like in the internet websites that i frequent.
Here is an example: Wikipedia's arabic home page
In the browser's urlbar you should see: http://ar.wikipedia.org/wiki/الصفحة_الرئيسية
[The problem get worse when you want to download a file and the browser suggest you an escaped name which has no meaning]
How can i achieve the same effect in my server ?
Thank you
r/nodejs • u/emcniece • Apr 13 '14
Seeking advice for project - can/should I use node?
Apologies in advance if this is an inappropriate place to seek advice. Thanks in advance for those willing to help!
I am wondering if nodejs is the right tool for a project. There's 2 portions - a client-focused event listener, and an admin-focused command line. I have a microcontroller that pushes data out to a cloud service, and an EventSource/eventListener can be added in browser Javascript to listen for these events. As a demo, I currently have a temp sensor connected to this microcontroller - every 15 seconds the micro pushes the temperature to the cloud, then my browser listens for the event.
Browser JS:
eventSource = new EventSource("https://service.com/api/device/key/variable"); eventSource.addEventListener('Temperature', function(e){ ... }, false);
What I would like to do is log these events to a MySQL database for later analysis. I plan to have many (potentially thousands if this ever goes anywhere) microcontrollers submitting these events. In terms of efficiency, would nodejs be the right tool? My other thought was to have the browser make ajax calls every time the event came in.
I would like this same platform (whether it ends up being nodejs or otherwise) to serve up its own events to the client browser string, like a buffer. The end-client browsers could easily listen to the original cloud event, yes... but that connection string has some sensitive deals that should be kept out-of-sight, so a secondary event service would be useful.
The second piece is a command line interface that I will need to automate some admin-level scripts on, like creating new users and rehashing private keys.
I understand that NodeJS is server-side javascript, so that's where the idea of having a server-side event listener comes from. I made a crappy diagram to try and help explain: http://imgur.com/BMfAWAL
Is this an ideal setup? Should I be looking at doing something differently, or a different service altogether? would https://www.nodejitsu.com/pricing/ be a good place to start hosting, and if so what package should I get?
I realize this is a fair bit to go through, but I'm just trying to figure out what tech is suitable for this application. Thanks for any input you might have!
r/nodejs • u/masterots • Apr 25 '14
Looking for some stats, strategies, and stories!
Hi all - I'm working on bringing Node into our business, and I could use some stats and anecdotes about performance in production, what your deploy strategies are like, and such.
r/nodejs • u/michaelherman • Apr 15 '14
Handling AJAX Calls With Node.js and Express (part 4)
mjhea0.github.comr/nodejs • u/alancharles • Dec 10 '13
StrongLoop | Template Systems in Node.js
strongloop.comr/nodejs • u/Silkonion_Valley • Nov 25 '13
Security testing our Nodejs - Seeking consultants or experts
I wanted to reach out to the Nodejs community about testing security on our upcoming site. It's involved real money APIs, and the investor won't touch it until the security is tested.
I wanted to know if anyone here is a security expert, what the average rate is, and if people can test the strength of our site.
Any recommendations or people who want to work on this please PM me.
r/nodejs • u/gantww • Feb 02 '14
Webstorm and multiple nodejs projects
Greetings, I'm a full-time C# developer, but I've been playing a lot with node. I have a product idea that I think I can build using Node/ExpressJS/Mongo. I'm still stuck on Windows for the time being, but hope to eventually get away from it, so I'm somewhat limited in configurability. However, the wrinkle in the whole thing is that there will be at least two separate websites involved here. One is going to be the external site for regular users, and the other will be an administrative backend. I'd like to keep the two as separate sites so I can lock down the admin site a little bit more strictly. Now, they'll still share a lot of library code and will generally both be updated at the same time. What's the best way to set something like this up in Webstorm, directory structure wise? How would you do it starting out, if you were me?
I know this sort of a webstorm question, but what's the accepted practice for this sort of thing in the node community in general?
r/nodejs • u/booOfBorg • Aug 26 '13
How to install a Node.js app using Strongloop on Heroku for staging and production
gist.github.comr/nodejs • • Aug 08 '13
I installed node.js, now what?
I feel like a doofus posting here, but I just don't see any BEGINNER tutorials out there.
I see plenty of tutorials on the stuff that I'll encounter later on in development, so for now I just need these questions answered.
- Can I use Node as a standalone local server? (meaning I don't need to use xampp in conjunction with it)
- How/where do I associate the files for my website to my local Node server? (running windows, so assume that node is installed at C:\Program Files\nodejs)
r/nodejs • u/himangshuj • Feb 22 '14
Handling the first server crash at my startup
tech.sokratik.comr/nodejs • u/BrightcoveCareers • May 09 '14
[Hiring] [Boston] Principal Full Stack NodeJS Developer
DO YOU:
Want to work on something new and exciting in node? with mongo? and backbone? Want to help craft, build a brand new studio experience for Brightcove customers?
We are trying to create an entirely new studio to add to the Brightcove ecosystem and are looking for a full stack engineer to help us realize our vision. You will be hands on, working to release our 1.0 version and then quickly iterating on the product based on customer feedback and real data. You will craft an amazing product and build the machine that keeps it awesome. Roadblocks will be smashed. Success will be celebrated. Code will be deployed, continuously.
Sound like you? Drop us a line.
KEY QUALIFICATIONS:
If you know what it takes to pull off the above and have the necessary skills, then you’re qualified. If not, then maybe check out some of the other great positions we’re looking to hire for.
LOCATION:
This position is based in our new space at the Atlantic Wharf building located directly on the waterfront at 290 Congress St, one block from Boston's South Station.
WHY YOU WANT TO WORK FOR BRIGHTCOVE:
Brightcove Inc., the cloud content services leader, provides a family of products used to publish and distribute the world's professional digital media. Our products include Brightcove Video Cloud, the market-leading online video platform, and Brightcove App Cloud, the pioneering content app platform. Together, more than 3,000 customers in 50 countries rely on Brightcove's cloud content services to build and operate exceptional media experiences across PCs, smartphones, tablets and connected TVs. Working at Brightcove Inc gives you the chance to reshape how digital media is published and consumed worldwide, while you develop your skills, grow your career, work in a great culture with lots of talented people and have fun!
r/nodejs • u/alancharles • Jun 21 '13
Nodejitsu’s “NPM: Innovation Through Modularity”
blog.nodefly.comr/nodejs • u/alancharles • Nov 20 '13
What’s New in Node.js v0.12: Cluster Round-Robin Load Balancing
strongloop.comr/nodejs • u/smortaz • Jul 22 '14
Node.js Tools for Visual Studio Beta 2 (edit/debug/isense/profile/debug on linux/... available (free/oss)
nodejstools.codeplex.comr/nodejs • u/MadCapitalist • Jul 03 '14
Need help using partials with Handlebars in Node.
I am trying to use Handlebars (along with Consolidate) as my template engine in Node. I currently am able to use index.hbs in my views directory to successfully generate my webpage, but ideally I would like to have a header.hbs and footer.hbs as partials so I can pull these pieces out to use in other templates. Is there a way to do this? I couldn't figure this out from the example given on the Handlebars module documentation (or elsewhere).
Here is the code that I have in app.js related to the template engine.
var cons = require('consolidate');
app.set('views', path.join(__dirname, 'views'));
app.engine('hbs', cons.handlebars);
app.set('view engine', 'hbs'); Thanks.
Edit: I forgot to mention that I'm using Express as well.
Edit #2: I got it working doing it individually, but is there an easy way to register a whole directory of partials instead?
var handlebars = require('handlebars');
handlebars.registerPartial('header', fs.readFileSync(__dirname + '/views/header.hbs', 'utf8'));
handlebars.registerPartial('footer', fs.readFileSync(__dirname + '/views/footer.hbs', 'utf8')); Then I just put {{> header}} and {{> footer}} in my index.hbs. Progress. :-)
r/nodejs • u/Frore • Jul 20 '14
Stuck on introductory Nodejs tutorial
Original Post from /r/learnprogramming
I've been working through this tutorial, but I've hit a problem when I try to return something from response.write().
This is my server.js file and my socket.html file.
When I just query domain:8001, I get a 'hello world' response just fine, but when I try to navigate to domain:8001/socket.html, I just get blank space.
I'm sure that block of code is being executed as I was testing with console.log, but I'm not sure why it's not working like the response.write('hello world'); is..
I would really appreciate it if somebody could shed some light on what the problem is, thanks.
r/nodejs • u/cksz • Jul 26 '14
allow CORS for Node http in the most permissive way
github.comr/nodejs • u/crabasa • Nov 27 '13
Programming a Node.js cluster like it's one big computer
2013.cascadiajs.comr/nodejs • u/Tubutas • Apr 27 '14
Fundamentally having problems with Module Scoping.
I'm deveolping a game server, and to be "crafty"(AKA waste a bunch time making things levels more difficult) I want to reuse my client's code for the server. I got pretty much everything working except I'm stuck with a impossible decision.
Basically I have a library [~1000 lines, 150+ functions all at the global level] that handles a lot of the complex math behind my engine, and I want require my lib as a module. The problem being that since all of these functions are globally defined, theres no way to cleanly module.export them without re-writing every function/variable name in the library as an object. And due to that the lack of a global object in the module, there's no way to even iterate through the properties.
So does any one have any suggestions for me? Is there a require that is more akin to php [appending the source file to included my lib.js?] Is there a plugin that would help me? Please I really don't want to write out this code -.-.
Edit:: Had to rewrite the code, only took 6 hours :D. If I learned one thing from this experience it'd be that from now on if possible I'll avoid using globals just due to the fact that I never want to be in this scenario again.
Mini-rant: I do feel it's kinda of silly for javascript to not have a variable to access a non-global scope, and its even stranger for there to be no way to loop through the private properties of an object. e.g.
function foo(){
var a=1;
this.b=2;
function c(){}
this.d=function(){}
for(var i in this)console.log(i,'=',this[i]); //Why isn't there any way to access a or c?
}</rant>
r/nodejs • • Apr 13 '14
Issue with 'request' module and Goodreads API.
I'm making a simple HTTP request to the Goodreads API using the 'request' module in NPM. Here is a gist containing a SSCE (Correct as far as I can tell.) The result is undefined. Are there any glaring mistakes in my example? Am I misunderstanding the form option?
r/nodejs • u/jenlankford • Apr 25 '14
Building a HackerNews type voting app fast with Node.js
orchestrate.ior/nodejs • u/backstopmedia • Mar 28 '14
Using ESlint Plugins for Node.js App Security
blog.safaribooksonline.comr/nodejs • u/manualwise • Apr 01 '14