Re: [nodejs] define is not defined errot
That’s an interesting opinion, but all nodejs code I’ve ever read makes modules this way, so that makes it the de-facto nodejs way. On Nov 26, 2013, at 23:47, Alex Kocharin wrote: > > It is not a nodejs way, it's a way that default loader works (there are > alternate loaders, and there is ES6 module system, though we don't know yet > what impact it would have). So there is a difference. > > There is one reason why it is not a node.js way. It blocks. In fact, one of > the reasons why node.js is so more popular than all other server-side js > frameworks, and why we are all here laughing out loud at silkjs, is an async > IO. But here it is synchronous require that uses readFileSync (which > should've been deprecated ages ago), and flies in the face of everything > node.js stands for. > > So yeah, it is rarely cause any trouble, and most of the modules are written > in this way, but it doesn't make it nodejs way. > > > On Wednesday, November 27, 2013 7:16:38 AM UTC+4, ryandesign wrote: >> The nodejs way would be: >> >> >> function SystemVersionResponse(input) { >> // the rest of your function here >> } >> >> exports.SystemVersionResponse = SystemVersionResponse; >> > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [nodejs] how to create a singleton
On Nov 26, 2013, at 23:50, dhtml wrote: > On Thursday, November 21, 2013 7:13:48 AM UTC-8, Gregg Caines wrote: > >> So how do you achieve the same effect in javascript? In the browser, you >> have globals. > > The global object has nothing to do with web browsers. Sure it does. In browsers you can reference a global easily from any file. In node, each file gets its own namespace, so you can’t. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [nodejs] Re: how to create a singleton
Sure that's the common explanation, but don't fall for it: globality has everything to do with it. If the singleton didn't care about creating global state, it could just have `this.created = true;` for its *only* internal state and have thrown exceptions from the constructor for any subsequent calls. That's the simplest way to ensure that only one instance gets constructed. In the browser, where there's no module system to stop your global variables from spraying everywhere, any singleton can just as safely be replaced by a simple single global instance instantiated normally. There's absolutely no difference in control or globality whatsoever, and you get better performance by not making completely unnecessary getInstance() calls just to get your instance. The singleton pattern is really nothing more than a hack to get globals into java via the global class namespace. Even in java, it's pretty common to solve the same problems with IoC containers now instead of singletons, because global state is generally considered A Bad Thing (unless used extremely judiciously). G On Tue, Nov 26, 2013 at 9:50 PM, dhtml wrote: > > > On Thursday, November 21, 2013 7:13:48 AM UTC-8, Gregg Caines wrote: > > >> So how do you achieve the same effect in javascript? In the browser, you >> have globals. >> > > The global object has nothing to do with web browsers. > > >> If you want just one instance of a thing, create it, and set it to a >> global variable. You can use that global variable everywhere. (If you're >> thinking "but global variables are bad!", I mostly agree. This is one of >> the reasons that the singleton itself is actually considered an >> anti-pattern by many. >> >> Singleton is necessary when the program must have at most one instance of > an object; where having two would be a problem. In javascript, it's > well-used where the initialization of that one object needs some variables > or configuration to initialize itself. > > -- > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to nodejs@googlegroups.com > To unsubscribe from this group, send email to > nodejs+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to a topic in the > Google Groups "nodejs" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/nodejs/GmUto9AN47U/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > nodejs+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [nodejs] what is best ide for node?
You should take a look a WebStorm (or PHPStorm) from JetBrains. The IDE understands JavaScript is chockful with useful features. But most of all you can run node from the IDE and you also have a terminal window at your disposal (which we use to run Grunt in.) If you want a full IDE, WebStorm is it. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Re: node knockout source code
That's on a team-by-team basis, I would imagine. You should be able to get contact info from each contestant and ask them directly. On Tuesday, November 26, 2013 6:59:05 AM UTC-6, John wrote: > > is the source code available for node knockout submissions ? couldn't > find it > > specifically looking at "Pretty Good Starts" and wanted to see how they > integrated Passport with postgresql / postgis > > ps: kudos to the team - pretty cool project > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Node.js support for Exporting excel and Database
I am new to node.js. I am currently in a pre-development phase of an application. The application will be for tracking status of task of employee. The admin will have the right to export excel which will have data of employes for a given date range Currently I am thinking WCF Service and SQL Server for the backend. Few days back, someone told me about node.js and it's capabilities. And yes I was impressed I wanted to know if I write a service with node.js, how will the service be hosted, also if I can write code for exporting data in excel, and lastly which database providers/adapters does node.js support? Apologies if there is typo or this question need to be asked in any other community of stackExchange. Thanks in advance Syed -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [nodejs] Node.js support for Exporting excel and Database
Maybe look at unoconv http://dag.wiee.rs/home-made/unoconv/ and do something in the line of exec("unoconv -f csv myfile.xls", err,... Downside, needs the bulky libreoffice libs installed. I wouldn't use the unoconv listener, seems a cpu killer. There's also node-unoconv, never tried that. On 27/11/13 12:55, Syed Haani wrote: I am new to node.js. I am currently in a pre-development phase of an application. The application will be for tracking status of task of employee. The admin will have the right to export excel which will have data of employes for a given date range Currently I am thinking WCF Service and SQL Server for the backend. Few days back, someone told me about node.js and it's capabilities. And yes I was impressed I wanted to know if I write a service with node.js, how will the service be hosted, also if I can write code for exporting data in excel, and lastly which database providers/adapters does node.js support? Apologies if there is typo or this question need to be asked in any other community of stackExchange. Thanks in advance Syed -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [nodejs] Re: What's the unicorn for Node? How should I think of deployment?
On Sat, Nov 16, 2013 at 6:03 PM, Eric Mill wrote: >> Wait, wait... Are you distributing your own patched nginx version? It >> doesn't sound simple at all. But I admit, a suggestion about using "nginx -> >> passenger -> node.js" is kinda funny. I guess 3 servers instead of 2 really >> reduce complexity. > > I did misread the docs, and missed that Standalone mode is free. However, it > doesn't actually feel very standalone, shipping with nginx compiled inside > it -- it's the same clunky situation as non-Standalone mode! You've just > made it easier to forget that the problem is there. Eric, Alex, I'm happy to tell you that we've just removed Nginx from Passenger Standalone. This should alleviate any concerns about simplicity and standaloneness. This change will be included in the next version, 2.0.26, which should be released at most a few weeks from now. -- Phusion | Ruby & Rails deployment, scaling and tuning solutions Web: http://www.phusion.nl/ E-mail: i...@phusion.nl Chamber of commerce no: 08173483 (The Netherlands) -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [nodejs] what is best ide for node?
Git support in webstorm is excellent. I don't ever need to go to tortoisegit or the command line. On Wed, Nov 27, 2013 at 12:58 AM, Marc Diethelm wrote: > You should take a look a WebStorm (or PHPStorm) from JetBrains. > > The IDE understands JavaScript is chockful with useful features. But most > of all you can run node from the IDE and you also have a terminal window at > your disposal (which we use to run Grunt in.) > If you want a full IDE, WebStorm is it. > > -- > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to nodejs@googlegroups.com > To unsubscribe from this group, send email to > nodejs+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to nodejs+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [nodejs] Node.js support for Exporting excel and Database
Never tried: https://github.com/SheetJS/js-xls https://github.com/SheetJS/js-xlsx -- Diogo Resende On Wednesday 27 November 2013 at 12:47 , klrumpf wrote: > Maybe look at unoconv http://dag.wiee.rs/home-made/unoconv/ > > and do something in the line of > > exec("unoconv -f csv myfile.xls", err,... > > Downside, needs the bulky libreoffice libs installed. > > I wouldn't use the unoconv listener, seems a cpu killer. > > There's also node-unoconv, never tried that. > On 27/11/13 12:55, Syed Haani wrote: > > > > I am new to node.js. > > > > > > I am currently in a pre-development phase of an application. > > > > > > The application will be for tracking status of task of employee. The admin > > will have the right to export excel which will have data of employes for a > > given date range > > > > > > Currently I am thinking WCF Service and SQL Server for the backend. > > > > > > Few days back, someone told me about node.js and it's capabilities. And yes > > I was impressed > > > > > > I wanted to know if I write a service with node.js, how will the service be > > hosted, also if I can write code for exporting data in excel, and lastly > > which database providers/adapters does node.js support? > > > > > > Apologies if there is typo or this question need to be asked in any other > > community of stackExchange. > > > > > > Thanks in advance > > > > > > Syed > > > > > > -- > > -- > > Job Board: http://jobs.nodejs.org/ > > Posting guidelines: > > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > > You received this message because you are subscribed to the Google > > Groups "nodejs" group. > > To post to this group, send email to nodejs@googlegroups.com > > (mailto:nodejs@googlegroups.com) > > To unsubscribe from this group, send email to > > nodejs+unsubscr...@googlegroups.com > > (mailto:nodejs+unsubscr...@googlegroups.com) > > For more options, visit this group at > > http://groups.google.com/group/nodejs?hl=en?hl=en > > > > --- > > You received this message because you are subscribed to the Google Groups > > "nodejs" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to nodejs+unsubscr...@googlegroups.com > > (mailto:nodejs+unsubscr...@googlegroups.com). > > For more options, visit https://groups.google.com/groups/opt_out. > > -- > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to nodejs@googlegroups.com > (mailto:nodejs@googlegroups.com) > To unsubscribe from this group, send email to > nodejs+unsubscr...@googlegroups.com > (mailto:nodejs+unsubscr...@googlegroups.com) > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to nodejs+unsubscr...@googlegroups.com > (mailto:nodejs+unsubscr...@googlegroups.com). > For more options, visit https://groups.google.com/groups/opt_out. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [nodejs] how to create a singleton
On Wednesday, November 27, 2013, Ryan Schmidt wrote: > > On Nov 26, 2013, at 23:50, dhtml wrote: > > > On Thursday, November 21, 2013 7:13:48 AM UTC-8, Gregg Caines wrote: > > > >> So how do you achieve the same effect in javascript? In the browser, > you have globals. > > > > The global object has nothing to do with web browsers. > > Sure it does. In browsers you can reference a global easily from any file. > In node, each file gets its own namespace, so you can’t. This is simply not true. By default, module code has access to the `global` object reference, which allows: // module.js global.foo = 1; // program.js require("./module.js"); console.log(foo); // 1 There is no implicit global environment bindings created for top level var declarations or function declarations because the source body of module code is wrapped in an IIFE: https://github.com/joyent/node/blob/master/src/node.js#L1007-L1014. Which is not the same as a unique "namespace" and certainly not the same as having a fresh realm-like global object. Rick > > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[nodejs] Streaming audio from avconv via NodeJs WebSockets into Chrome with AudioContext
Hello, we're having trouble playing streamed audio in a browser (using Chrome). We have a process which is streaming some audio (for example an internet radio) on udp on some port. It's avconv (`avconv -y -i SOMEURL -f alaw udp://localhost:PORT`). We have a NodeJs server which receives this audio stream and forwards it to multiple clients connected via websockets. The audio stream which NodeJs receives is wrapped in a buffer which is an array with numbers from 0 to 255. The data is sent to the browser without any issues and then we're using AudioContext to play the audio stream in the browser (our code is based on AudioStreamer - https://github.com/agektmr/AudioStreamer). At first, all all we got at this point was static. When looking into the AudioStreamer code, we realized that the audio stream data should be in the -1 to 1 range. With this knowledge we tried modifying each value in the buffer with this formula `x = (x/128) - 1`. We did it just to see what would happen and surprisingly the static became a bit less awful - you could even make out melodies of songs or words if the audio was speech. But it's still very very bad, lots of static, so this is obviously not a solution - but it does show that we are indeed receiving the audio stream via the websockets and not just some random data. So the question is - what are we doing wrong? Is there a codec/format we should be using? Of course all the code (the avconv, NodeJs and client side) can be modified at will. We could also use another browser if needed, though I assume that's not the problem here. The only thing we do know is that we really need this to work through websockets. The OS running the avconv and NodeJs is Ubuntu (various versions 10-13) Any ideas? All help will be appreciated. Thanks! Tomas -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [nodejs] what is best ide for node?
+1 for Webstorm... If you're in windows land, and already have Visual Studio 2012 or 2013, would suggest looking at Visual Studio Tools for NodeJS (NTVS), which are pretty nice. One of my coworkers really likes eclipse for node dev. -Original Message- From: Jeff Schwartz Sent: Saturday, November 23, 2013 10:06 PM To: nodejs@googlegroups.com Subject: [nodejs] what is best ide for node? I use sublime text 3/vintage with the TernJS plugin. Works great. I also use Webstorm from Jetbrains. And then there's Vim which I use for remote servers. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [nodejs] Node.js support for Exporting excel and Database
If you do an exec like that for something heavy, might want to wrap it into a module that itself is wrapped in a generic pool (to prevent too many instances from running) From: klrumpf Sent: Wednesday, November 27, 2013 5:47 AM To: nodejs@googlegroups.com Subject: Re: [nodejs] Node.js support for Exporting excel and Database Maybe look at unoconv http://dag.wiee.rs/home-made/unoconv/ and do something in the line of exec("unoconv -f csv myfile.xls", err,... Downside, needs the bulky libreoffice libs installed. I wouldn't use the unoconv listener, seems a cpu killer. There's also node-unoconv, never tried that. On 27/11/13 12:55, Syed Haani wrote: I am new to node.js. I am currently in a pre-development phase of an application. The application will be for tracking status of task of employee. The admin will have the right to export excel which will have data of employes for a given date range Currently I am thinking WCF Service and SQL Server for the backend. Few days back, someone told me about node.js and it's capabilities. And yes I was impressed I wanted to know if I write a service with node.js, how will the service be hosted, also if I can write code for exporting data in excel, and lastly which database providers/adapters does node.js support? Apologies if there is typo or this question need to be asked in any other community of stackExchange. Thanks in advance Syed -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [nodejs] Node.js support for Exporting excel and Database
If you use MS-SQL server, would suggest the “tedious” module over the MS one... it’s more portable. You may want to consider PostgreSQL or MySQL if either are an option (I prefer PostreSQL). (based on what your are describing for your data, I would lean towards an SQL database vs a non-relational db... Some use cases are better suited for NoSQL, yours doesn’t seem to be one of them) You can mount endpoints pretty easily with nodejs, though there are some REST frameworks for getting you going faster. For running the application as a service in windows, you’ll likely want to use NSSM (Non-Sucking Service Manager) to create your service entry in windows. For Linux, depends on your distro & version. As for “exporting” to excel if you only need one worksheet would just output to CSV which excel can open (then re-save) fine... if you need more, there are libraries, but they come with a little more overhead. From: Syed Haani Sent: Wednesday, November 27, 2013 4:55 AM To: nodejs@googlegroups.com Subject: [nodejs] Node.js support for Exporting excel and Database I am new to node.js. I am currently in a pre-development phase of an application. The application will be for tracking status of task of employee. The admin will have the right to export excel which will have data of employes for a given date range Currently I am thinking WCF Service and SQL Server for the backend. Few days back, someone told me about node.js and it's capabilities. And yes I was impressed I wanted to know if I write a service with node.js, how will the service be hosted, also if I can write code for exporting data in excel, and lastly which database providers/adapters does node.js support? Apologies if there is typo or this question need to be asked in any other community of stackExchange. Thanks in advance Syed -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [nodejs] how to create a singleton
of course you could just as easy have done... //foo module ... var foo = {...} module.exports = foo; //app.js var foo = require(‘foo’) all require(‘foo’) with the same library reference will be the same... the only thing global does is allow multiple versions of libraries not to stomp on eachother... //bar module – first to register wins module.exports = global.__bar__ = global.__bar__ || initModule(); function initModule() { return {\*...some object...*\}; } ... which can also be valuable From: Rick Waldron Sent: Wednesday, November 27, 2013 11:36 AM To: nodejs@googlegroups.com Subject: Re: [nodejs] how to create a singleton On Wednesday, November 27, 2013, Ryan Schmidt wrote: On Nov 26, 2013, at 23:50, dhtml wrote: > On Thursday, November 21, 2013 7:13:48 AM UTC-8, Gregg Caines wrote: > >> So how do you achieve the same effect in javascript? In the browser, you have globals. > > The global object has nothing to do with web browsers. Sure it does. In browsers you can reference a global easily from any file. In node, each file gets its own namespace, so you can’t. This is simply not true. By default, module code has access to the `global` object reference, which allows: // module.js global.foo = 1; // program.js require("./module.js"); console.log(foo); // 1 There is no implicit global environment bindings created for top level var declarations or function declarations because the source body of module code is wrapped in an IIFE: https://github.com/joyent/node/blob/master/src/node.js#L1007-L1014. Which is not the same as a unique "namespace" and certainly not the same as having a fresh realm-like global object. Rick -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [nodejs] what is best ide for node?
Absolutely WebStorm is the best I have encountered. On Saturday, August 6, 2011 10:08:54 PM UTC-5, JJuN wrote: > > > > hello ~ > > i think node is really awesome but ide is not > > i used cloud9 it's cool and support stack debugging but no > intelligence > > please recommand good ide for me!! > > > and which template is best for node, jade is good but no syntax > highlighting no intelligence! -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [nodejs] how to create a singleton
On Wednesday, November 27, 2013, Michael J. Ryan wrote: > of course you could just as easy have done... > > Sure, if I was trying to illustrate something that wasn't the thing I was trying to illustrate. Or if I wanted to confuse my point with something questionably relevant. Rick > //foo module ... > var foo = {...} > module.exports = foo; > > //app.js > var foo = require(‘foo’) > > all require(‘foo’) with the same library reference will be the same... > > > the only thing global does is allow multiple versions of libraries not to > stomp on eachother... > > //bar module – first to register wins > module.exports = global.__bar__ = global.__bar__ || initModule(); > > function initModule() { > return {\*...some object...*\}; > } > ... > > which can also be valuable > > > *From:* Rick Waldron 'waldron.r...@gmail.com');> > *Sent:* Wednesday, November 27, 2013 11:36 AM > *To:* nodejs@googlegroups.com 'nodejs@googlegroups.com');> > *Subject:* Re: [nodejs] how to create a singleton > > > > On Wednesday, November 27, 2013, Ryan Schmidt wrote: > >> >> On Nov 26, 2013, at 23:50, dhtml wrote: >> >> > On Thursday, November 21, 2013 7:13:48 AM UTC-8, Gregg Caines wrote: >> > >> >> So how do you achieve the same effect in javascript? In the browser, >> you have globals. >> > >> > The global object has nothing to do with web browsers. >> >> Sure it does. In browsers you can reference a global easily from any >> file. In node, each file gets its own namespace, so you can’t. > > > This is simply not true. By default, module code has access to the > `global` object reference, which allows: > > // module.js > global.foo = 1; > > > // program.js > require("./module.js"); > > console.log(foo); // 1 > > > There is no implicit global environment bindings created for top level var > declarations or function declarations because the source body of module > code is wrapped in an IIFE: > https://github.com/joyent/node/blob/master/src/node.js#L1007-L1014. Which > is not the same as a unique "namespace" and certainly not the same as > having a fresh realm-like global object. > > Rick > > >> >> -- > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to > nodejs@googlegroups.com > To unsubscribe from this group, send email to > nodejs+unsubscr...@googlegroups.com 'nodejs%2bunsubscr...@googlegroups.com');> > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to nodejs+unsubscr...@googlegroups.com 'nodejs%2bunsubscr...@googlegroups.com');>. > For more options, visit https://groups.google.com/groups/opt_out. > > -- > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to > nodejs@googlegroups.com > To unsubscribe from this group, send email to > nodejs+unsubscr...@googlegroups.com 'nodejs%2bunsubscr...@googlegroups.com');> > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to nodejs+unsubscr...@googlegroups.com 'nodejs%2bunsubscr...@googlegroups.com');>. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.