Re: [nodejs] Re: How do I use NPM for JavaScript packages?

2016-01-31 Thread Angel Java Lopez
You also can use bower http://bower.io/ Maybe, it is more aligned with your use case. Think it as a "npm for the browser" Angel "Java" Lopez @ajlopez On Sun, Jan 31, 2016 at 10:06 AM, Zlatko wrote: > Of course you can use npm to download general JavaScript packages,

Re: [nodejs] Node js Learning resources

2016-01-31 Thread Angel Java Lopez
"Java" Lopez @ajlopez On Sun, Jan 31, 2016 at 7:02 AM, haider malik wrote: > what are the best resources to learn node js for beginners? > > -- > Job board: http://jobs.nodejs.org/ > New group rules: > https://gist.github.com/othiym23/9886289#file-moderation

Re: [nodejs] Best practice for developing library + app at the same time

2015-12-30 Thread Angel Java Lopez
mylibrary into global npm Hope it helps Angel "Java" Lopez @ajlopez On Wed, Dec 30, 2015 at 3:17 PM, Ryan Graham wrote: > Releases packages are not expected to change. This is sort of a core > assumption within npm and, as I understand it, quite central in its caching >

Re: [nodejs] js callack still returning undefined ---

2015-12-06 Thread Angel Java Lopez
, you can use the console console.log(""); console.log(metadata); // or console.dir(metadata) or console.log(JSON.stringify(metadata, null, 4) }); Angel "Java" Lopez @ajlopez On Sun, Dec 6, 2015 at 4:27 PM, wasiu razak wrote: > hi , am have tried all possible

Re: [nodejs] es6 'let' vs 'var' memory usage

2015-12-06 Thread Angel Java Lopez
, and the time is near to original let.js version First conclusion: the let in the for has more cost than the let in f function, because it involves a local var to the for, while let in f function is totally equivalent to var Angel "Java" Lopez @ajlopez On Sun, Dec 6, 2015 at 10:57 AM

Re: [nodejs] ORM for using with Express for SQL and.or NoSQL

2015-09-11 Thread Angel Java Lopez
Hi! IMNSHO :-) simplicity pays Save plain javascript objects to MongoDB. Only if you need an ORM, then switch to use Moongose. But in many projects, I wrote all persistence directly to mongodb, Other opinions? Angel "Java" Lopez @ajlopez On Fri, Sep 11, 2015 at 3:56 PM, Pito Sa

Re: [nodejs] A microframework in node.js called elet

2015-08-09 Thread Angel Java Lopez
implement async call using fiber module (but I think it could be "too much") - Any example of: authentication, upload file? - Maybe cache of compiled templates, like the output of hogan.compile... Mustache cache the same text, and then skip compile - Tests, tests, tests ;-) Angel &q

Re: [nodejs] Passportjs authentication

2015-07-12 Thread Angel Java Lopez
odule, and how to manage the response directly with res.send, instead of 401 Angel "Java" Lopez @ajlopez On Sun, Jul 12, 2015 at 8:55 AM, Lazar Gubezkis wrote: > I'm using the local authentication strategy with passportjs: > > passport.use(new LocalStrategy( > f

[nodejs] NodeJs Install in old Windows, access denied

2015-04-04 Thread Angel Java Lopez
I tried: 0.12.0-x86.msi 0.10.38-x86.msi with the same result Curiously, when running again 0.10.25-x86.msi, a windows appears, title "Security Warning, the publisher could not be verified... " and if I choose cancel, "access denied" is shown at command prompt. Any cue?

Re: [nodejs] Creating an array of key-value pairs(fetched from a mongoDB database) dynamically

2015-03-14 Thread Angel Java Lopez
to pay to live at Node.js paradise ;-) Angel "Java" Lopez @ajlopez On Sat, Mar 14, 2015 at 6:55 AM, Aryak Sengupta wrote: > *I am trying to create an array of Key-Value pairs dynamically with a > document from a MongoDB database .* > > I have posted my question on Stack Overf

Re: [nodejs] Simple CRUD app using Node.js Express & MySQL

2015-02-15 Thread Angel Java Lopez
essjs/body-parser they are using req.body.username, directly Angel "Java" Lopez @ajlopez On Sun, Feb 15, 2015 at 6:28 PM, Zafar Saeed Khan wrote: > here is the repo of my project at Git > https://github.com/ZafarSaeedKhan/Simple_CRUD_App_Node.js.git > Do practice and have fun

Re: [nodejs] Asynchronous file reading not asynchronous or programmer poop?

2015-01-24 Thread Angel Java Lopez
onous file reading function fileReadCallBack(err, data) { if(err) return; // or maybe better, inform the problem var numOfNewLines = data.toString().split('\n').length-1; console.log(numOfNewLines); } } Apologize my English ;-) Angel "Java" Lopez @ajlopez On Sat

Re: [nodejs] Re: Payment Gateway / Card Processing

2015-01-11 Thread Angel Java Lopez
Loosely related http://www.businessinsider.com/the-payments-industry-explained-2014-12 Angel "Java" Lopez @ajlopez On Wed, Jan 7, 2015 at 3:42 PM, Carlos Carcamo wrote: > Thanks Angel, mango looks great, do you know any other that operates on > latin america? > I wo

Re: [nodejs] Re: Payment Gateway / Card Processing

2015-01-06 Thread Angel Java Lopez
The new kid on the block https://getmango.com/en/ with a REST API Angel "Java" Lopez @ajlopez On Tue, Jan 6, 2015 at 3:10 PM, Carlos Carcamo wrote: > Hello, I'm looking for something similar, I have taken a look to stripe > and also https://www.braintreepayments.com/, b

Re: [nodejs] Are Node.js + Express.js or Meteor good options for a Real Estate Website ?

2014-11-30 Thread Angel Java Lopez
-side JavaScript community, and the choice of other options. BTW, check the meteor open sourced https://github.com/CodersTV http://coderstv.com/ with videos, like your site Other comments? Angel "Java" Lopez @ajlopez On Sun, Nov 30, 2014 at 2:46 AM, Miguel Vasquez < videoclasificadospan.

Re: [nodejs] Simple rule engine ported to Node.js

2014-11-22 Thread Angel Java Lopez
ve a package.json with short dev dependency list, at least for the first iterations/versions. But I guess this is a personal taste/decision. Angel "Java" Lopez @ajlopez On Sat, Nov 22, 2014 at 5:14 AM, Ant Kutschera wrote: > Hi, > > I have ported my simple rule engine f

Re: [nodejs] Making a node.js component

2014-11-21 Thread Angel Java Lopez
Can you include the code for // do http request & ... ? And what is the code if do http request fails? Another point: you don't need return res.json ..; Change to res.json...; Angel "Java" Lopez @ajlopez On Fri, Nov 21, 2014 at 6:40 AM, André Simões wrote: > Hi.

Re: [nodejs] How to connect Kinect V2 with Node

2014-11-17 Thread Angel Java Lopez
Some links, I never tried them: https://github.com/pgte/node-kinect http://www.sweatintotheweb.com/nuimotion-for-node-js/ Another path http://en.wikipedia.org/wiki/OpenNI https://github.com/pgte/node-openni On Mon, Nov 17, 2014 at 3:03 AM, Darren wrote: > @jcbatista on twitter has written cod

Re: [nodejs] ipc pipe with fork

2014-10-26 Thread Angel Java Lopez
I never used that feature, but, why not use the "built-in" IPC channel given by fork? http://nodejs.org/api/child_process.html#child_process_child_process_fork_modulepath_args_options In addition to having all the methods in a normal ChildProcess instance, the returned object has a communication

Re: [nodejs] hosted web application in existing environments

2014-10-13 Thread Angel Java Lopez
I prefer Node.js alone, with communication with JVM world, as pointed by Aria Another link, I never tried it, for Java 8 http://blog.jonasbandi.net/2014/03/running-nodejs-applications-on-jvm-with.html Nashorn and Avatar Angel "Java" Lopez @ajlopez On Mon, Oct 13, 2014 at 11:02 AM, Ar

Re: [nodejs] npm install mongodb explosion

2014-10-02 Thread Angel Java Lopez
My guess: The original output was colored, yellow color. It's usual on Windows, something appears as having compile problem related to Kerberos/node-gyp, but after those messages, all is working. I'm not sure what part of mongodb is affected Angel "Java" Lopez @ajlopez On

Re: [nodejs] Advantages of functions as modules

2014-10-02 Thread Angel Java Lopez
hout problem. If B module populated the global environment, such separation could not be possible. NPM is the "secret weapon" in Node.js ecosystem. Paraphrasing David Hilbert: "No one will drive us from the paradise which Node.js modules created for us" Angel "Java"

Re: [nodejs] How can Node.js be a replacement for the server side when users can see the files?

2014-09-18 Thread Angel Java Lopez
ers Angel "Java" Lopez @ajlopez On Thu, Sep 18, 2014 at 1:24 PM, Aleksandra Czajka wrote: > I'm looking into Node.js to replace my server side for the next projects I > work on. One of the greatest benefits of using server side is that > communication of sensitive data i

Re: [nodejs] Windows 8.3 File Names

2014-08-20 Thread Angel Java Lopez
AFAIK, Node.js returns and use the long name. Indeed, I don't know how to retrieve the short name using node ;-) Other comments? Angel "Java" Lopez @ajlopez On Wed, Aug 20, 2014 at 2:39 AM, Joran Dirk Greef wrote: > I am working on file synchronization and would like t

Re: [nodejs] Re: Fundamentals: Callbacks in Node?

2014-08-12 Thread Angel Java Lopez
ner(a, 6); } myVar = outer(4); The server example was http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }).listen(1337, '127.0.0.1'); Is this the case? Angel "Java" Lop

Re: [nodejs] nodes js module for desktop apps

2014-07-09 Thread Angel Java Lopez
Angel "Java" Lopez @ajlopez On Wed, Jul 9, 2014 at 2:46 AM, zladuric wrote: > So just node.js binary, but packet with your app? > > -- > Job board: http://jobs.nodejs.org/ > New group rules: > https://gist.github.com/othiym23/9886289#file-moderation-policy-md > O

Re: [nodejs] Re: How to write code for routing and route handler's using nodejs(without using frameworks line express/compound)

2014-07-02 Thread Angel Java Lopez
A simple router https://github.com/ajlopez/NodeSamples/blob/master/WebServer/server4.js (no parameters, only routes) It's an evolution of screencasts in Spanish On Wed, Jul 2, 2014 at 12:53 AM, Ethan Garofolo wrote: > I did a screencast that gets into routing without Express: > http://www.learn

Re: [nodejs] Java Houses Adopting Node.js

2014-06-26 Thread Angel Java Lopez
business people talk about requirements, and the dev team was busy in their notebooks. When the business people ended, asked "do you take notes?" the notebook had the implemented prototype ready ;-) Angel "Java" Lopez @ajlopez On Thu, Jun 26, 2014 at 5:35 AM, Adam Davi

Re: [nodejs] what is this code doing?

2014-06-25 Thread Angel Java Lopez
Ummm... variable l takes the values "TRACE", "DEBUG", ... from the names in LEVEL Then LEVEL[l] takes the values 10, 20, 30, The values are converted to string Then Level["10"] = "TRACE"; Level["20"] = "DEBUG"; and so on It's making the "inverse dictionary" Angel "Java" Loepz @ajlopez

Re: [nodejs] Re: windows 7: node ignoring PATH and NODE_PATH

2014-06-14 Thread Angel Java Lopez
The install should add c:\User\Mike\AppData\Roaming\npm\node_modules to your PATH If it is not in your PATH (not NODE_PATH), add it manually Angel "Java" Lopez @ajlopez On Fri, Jun 13, 2014 at 4:45 AM, greelgorke wrote: > if you install a package with -g then the respe

Re: [nodejs] Node.js with PHP and Laravel?

2014-05-21 Thread Angel Java Lopez
Sorry, short answer: some links at https://delicious.com/ajlopez/nodejs,php On Wed, May 21, 2014 at 5:51 PM, Taylor Moss wrote: > I am creating a web streaming platform in PHP and I am using PHP with the > Laravel framework. As I am getting more into the project I have realised > that node.js

Re: [nodejs] onload?

2014-05-19 Thread Angel Java Lopez
rom app.js too, then // app.js var dependency = require('./dependency.js'); dependency.js is loaded only one, the second require returns a "cache" version. I usually make a single file, not for Node.js, but for JavaScript modules (developed for node) that now I want to run on browse

Re: [nodejs] Whats "@" used for?

2014-05-19 Thread Angel Java Lopez
Sorry, I don't know a code that uses @ in Node.js Do you have code to show? Node.js is based on JavaScript, I didn't find the @ operator at (not pun intended ;-) https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators Angel "Java" Lopez @aj

Re: [nodejs] Best way to search through a big plain object

2014-05-19 Thread Angel Java Lopez
implementations, measuring time. Make it work, make it right, make it fast (attributed to Kent Beck) Angel "Java" Lopez @ajlopez On Sun, May 18, 2014 at 11:25 PM, Joshua Lunsford < joshua.taylor.lunsf...@gmail.com> wrote: > Just remember that you have 16.66ms to do any calculati

Re: [nodejs] looping through a large array - forEach vs process.setImmediate vs process.nextTick

2014-05-13 Thread Angel Java Lopez
rted to appear, circa 0.8 to 0.10) (recently, I realized that setImmediate is not defined in some browser, so if your library should run in client-side too, use setTimeout(fn, 0) Other comments? Angel "Java" Lopez @ajlopez On Tue, May 13, 2014 at 3:42 AM, krishnan venkat wrote: >

Re: [nodejs] porting a library to node.js

2014-05-11 Thread Angel Java Lopez
ter samples You can read a lot of good code and module use/patterns at https://github.com/substack ie https://github.com/substack/minimist Angel "Java" Lopez @ajlopez On Sun, May 11, 2014 at 9:21 AM, Massimiliano Tomassoli wrote: > Hi everyone, > I'd like to port a Dart li

Re: [nodejs] unit testing using JSTestDriver

2014-05-08 Thread Angel Java Lopez
I'm use node.js server-side assert, or some test framework, like node-unit. No problem with modules that have require. Can you describe your test environment, workflow, in more detail? any example code? Angel "Java" Lopez @ajlopez On Thu, May 8, 2014 at 6:23 PM, Reza Razavip

Re: [nodejs] Pass data to view

2014-05-05 Thread Angel Java Lopez
You must execute the res.view AFTER retrieving the data in the callback. My first guess in your case: index : function(req, res){ graph.setAccessToken(req.user.token); var events = []; graph.get("/me/events?limit=500", {limit: 500}, function(err, rep) { for(key

Re: [nodejs] Order in array is reversed when save in mongodb

2014-05-05 Thread Angel Java Lopez
I should have better info with a reference, but I guess that some methods in ecmascript 6 will have an order to retrieve properties. Maybe, there is already some specification in ecmascript 5. On Mon, May 5, 2014 at 1:30 AM, Ryan Schmidt wrote: > > On May 4, 2014, at 19:05, Karl Tiedt wrote: > >

Re: [nodejs] Re: changes to the moderation of this group

2014-05-04 Thread Angel Java Lopez
oup, than exploring Stack Overflow. Any question, doubt, comment related to Node.js should be welcome. But it's only my personal opinion. Angel "Java" Lopez @ajlopez On Sun, May 4, 2014 at 8:32 AM, Tiago Pontes wrote: > +1 > > Domingo, 4 de Maio de 2014 6:44:16 UTC+1, Beh

Re: [nodejs] Order in array is reversed when save in mongodb

2014-05-03 Thread Angel Java Lopez
ase. The array keeps the order. In which way the order of PROPERTIES of EACH element has influence on the chart output? Angel "Java" Lopez @ajlopez On Sat, May 3, 2014 at 11:30 AM, Alejandro Paciotti < alejandro.pacio...@gmail.com> wrote: > The problem is that i use this

Re: [nodejs] Order in array is reversed when save in mongodb

2014-05-03 Thread Angel Java Lopez
situation: mangled array. But apparently, this is not the case. Angel "Java" Lopez @ajlopez On Sat, May 3, 2014 at 3:28 AM, Alejandro Paciotti < alejandro.pacio...@gmail.com> wrote: > I send to the function this: > > [ { Periodo: '2010-08', > Total:

Re: [nodejs] Instantiate an object in a subfolder

2014-04-21 Thread Angel Java Lopez
low.com/questions/8131344/what-is-the-difference-between-dirname-and-in-node-js Notice the difference of './...' in require vs fs.readFile. In require, './...' is the directory of the current script. But in any filesystem operation, it is the current user directory Angel "Jav

Re: [nodejs] Add a Customized Message to the Response Header

2014-04-17 Thread Angel Java Lopez
First question: are you using Node.js, OR Node.js + Express (which version?)? On Thu, Apr 17, 2014 at 2:28 PM, JPJen wrote: > > > I am using Node.js. > > I have a piece of code that works well in returning the expected response > and the response is received quickly: > > if (req.accepts('json')

Re: [nodejs] Write nodejs in java

2014-04-14 Thread Angel Java Lopez
Bad and short English here: What is "clear and elegant manner"? Why not JavaScript for this? Angel "Java" Lopez @ajlopez On Mon, Apr 14, 2014 at 3:47 AM, Denis Bardadym wrote: > You can wait for java 8 (which has nashorn js engine) and project avalon, > which is node

Re: [nodejs] Need help with "modules.exports" on external modules

2014-03-27 Thread Angel Java Lopez
You must write this.getDistance = ... instead of getDistance = ... without this. On Thu, Mar 27, 2014 at 8:02 AM, fm3391 wrote: > I tried this and everything looks better. The class should only be > instantiated once from server.js. I think my main problem is I don't know > how to make a

Re: [nodejs] New to Node. How do I use package.json files and what exactly is it for??

2014-03-26 Thread Angel Java Lopez
aster/package.json Angel "Java" Lopez @ajlopez On Wed, Mar 26, 2014 at 11:49 AM, Frank Z wrote: > I bought a book on Node.js since I'm teaching myself backend development, > and in this book the author talks about the importance of package.json > files. He emphasizes that it

Re: [nodejs] Which is the most common framework for Nodejs?

2014-03-25 Thread Angel Java Lopez
Soory, I forgot this link http://www.queness.com/post/16219/29-nodejs-frameworks-for-fast-javascript-development On Tue, Mar 25, 2014 at 6:38 AM, Angel Java Lopez wrote: > Something to explore, Kraken > http://krakenjs.com/ > by Paypal > > > On Tue, Mar 25, 2014 at 6:00 AM,

Re: [nodejs] Which is the most common framework for Nodejs?

2014-03-25 Thread Angel Java Lopez
Something to explore, Kraken http://krakenjs.com/ by Paypal On Tue, Mar 25, 2014 at 6:00 AM, Trang Tung Nguyen wrote: > The following link contains a list of 12 webapp frameworks for nodejs that > may fulfil your question: > > > http://codecondo.com/10-web-application-frameworks-for-node-js/?utm

Re: [nodejs] Node Js integration with PHP

2014-03-24 Thread Angel Java Lopez
async client in a web application. Maybe, the sync client is good enought for the first "baby steps" in your project More details, dnode + php async, php as client, php as server at: http://bergie.iki.fi/blog/dnode-make_php_and_node-js_talk_to_each_other/ Angel "Java" Lopez @ajlopez

Re: [nodejs] Which is the most common framework for Nodejs?

2014-03-22 Thread Angel Java Lopez
you asked " the BEST and the most common" and that is something to discuss ;-) And asked "easy to use" well, express is simple, but you need to manage some few things by yourself. I prefer that way. My conclusion: there is no "easy to use and common" one. Node.

Re: [nodejs] Re: node vs dart

2014-03-05 Thread Angel Java Lopez
eat focused mission: to be the bricks of the first SkyNet ;-) The other side (call it "client"?) is under vibrant development. Linking Node to "the other side" is not the way to follow. Vive le difference! Angel "Java" Lopez @ajlopez On Wed, Mar 5, 2014 at 4:49 PM, Pa

Re: [nodejs] Re: Build nodejs with an alternative build system?

2014-03-05 Thread Angel Java Lopez
V8 is using Gyp https://code.google.com/p/v8/wiki/BuildingWithGYP "GYP is a meta build system of sorts, as it generates build files for a number of other build systems. How you build therefore depends on what "back-end" build system and compiler you're using." On Wed, Mar 5, 2014 at 10:36 AM,

Re: [nodejs] Healthcare needs the help of the Node.js Community

2014-03-04 Thread Angel Java Lopez
AFAIK, meteor is running ok with fibers in Windows. And with a bit of work, you can call npm async packages, too. On Tue, Mar 4, 2014 at 10:44 AM, rtweed wrote: > Grrr! You've got me back to thinking about fibers as an alternative > architecture for EWD.js now! :-) > > They certainly provide

Re: [nodejs] Healthcare needs the help of the Node.js Community

2014-03-04 Thread Angel Java Lopez
A possible wrapper for child process, as a baby step: http://nodejs.org/api/cluster.html It uses child process, but IPC (inter process communication) for bidirectional communication. I'm not sure about Windows status of this experimental feature On Tue, Mar 4, 2014 at 9:30 AM, rtweed wrote:

Re: [nodejs] Healthcare needs the help of the Node.js Community

2014-03-04 Thread Angel Java Lopez
sing require('http')? The calls are async? My guess: you wrote sync code to access your mumps data. (like slide 20). But you cannot do anything async in the back end function. Am I right? Angel "Java" Lopez @ajlopez On Tue, Mar 4, 2014 at 8:53 AM, rtweed wrote: > 1) EHR: Ele

Re: [nodejs] Healthcare needs the help of the Node.js Community

2014-03-04 Thread Angel Java Lopez
, but, only one request at a time? is it true? Maybe you could apply Meteor ideas: no callback hell, but fibers https://www.meteor.com/ Angel "Java" Lopez @ajlopez On Tue, Mar 4, 2014 at 8:31 AM, rtweed wrote: > How to get involved if you're interested in this important ma

Re: [nodejs] Re: What do we call ourselves? Nodesters?

2014-03-04 Thread Angel Java Lopez
Nodurians? ;-) I prefer node developers On Tue, Mar 4, 2014 at 5:55 AM, Floby wrote: > Nodles > > > On Thursday, 27 February 2014 19:53:45 UTC+1, CoolAJ86 wrote: >> >> Is it 'noders' as in 'coders' or 'nodesters' as in 'drinking http before >> it was cool'? What are we? >> >> I'm trying to com

Re: [nodejs] node vs dart

2014-03-02 Thread Angel Java Lopez
have a mixed of implementation and ideas) Then, to run Express on Dart VM, you must find a way to reproduce Node.js require semantic. Angel "Java" Lopez @ajlopez On Sun, Mar 2, 2014 at 3:16 AM, Pat Monardo wrote: > This is sort of twisting my mind a bit. I could have Dart VM on the

Re: [nodejs] how to install node app with

2014-03-01 Thread Angel Java Lopez
One path to explore: https://github.com/rogerwang/node-webkit It still needs nw executable Other options? On Sat, Mar 1, 2014 at 2:18 PM, Michael Monashev wrote: > Hi. > > I can install my app as Node.JS + some my JavaScript-related files. > > How to install my app as monolithic program? And ho

Re: [nodejs] node and database connection pool

2014-02-27 Thread Angel Java Lopez
e use of the same one for multiple operations. Angel "Java" Lopez @ajlopez On Thu, Feb 27, 2014 at 11:53 AM, Matt wrote: > > On Wed, Feb 26, 2014 at 2:50 PM, Angel Java Lopez > wrote: > >> I just found: >> >> https://github.com/felixge/node-mysql >&

Re: [nodejs] node and database connection pool

2014-02-26 Thread Angel Java Lopez
://github.com/felixge/node-mysql/blob/master/lib/Connection.js and connection use require('net') That's the magic! ;-) The driver author uses LibUv indirectly. Angel "Java" Lopez @ajlopez On Wed, Feb 26, 2014 at 4:45 PM, Angel Java Lopez wrote: > Ummm... You can write a driver

Re: [nodejs] node and database connection pool

2014-02-26 Thread Angel Java Lopez
It's all about the event loop. Here's how an event loop works: > http://baudehlo.com/2013/02/14/how-an-event-loop-works/ > > > On Wed, Feb 26, 2014 at 12:53 PM, Reza Razavipour < > reza.razavip...@gmail.com> wrote: > >> makes perfect sense, thank

Re: [nodejs] node and database connection pool

2014-02-26 Thread Angel Java Lopez
Angel "Java" Lopez @ajlopez On Wed, Feb 26, 2014 at 2:14 PM, Reza Razavipour wrote: > If node is single threaded and I can only be making one database call at > any time, what is the point of having a pool of db connnections? > > -- > -- > Job Board: http://jobs.node

Re: [nodejs] Module: how to pass variable ?

2014-02-25 Thread Angel Java Lopez
dule = function view() It's not the same. Angel "Java" Lopez @ajlopez On Tue, Feb 25, 2014 at 1:18 PM, Ziobudda wrote: > Hi Kevin, I have not understand how to pass "req" and "res" variable to my > module. > For post I have understand that I c

Re: [nodejs] How to Node.js ?

2014-02-22 Thread Angel Java Lopez
nother one with middleware. It's a long road, but a really fascinating one. Angel "Java" Lopez @ajlopez On Sat, Feb 22, 2014 at 3:13 PM, Anup Panwar wrote: > Hello am new in Node.js and it's really hard for me to learn. Can any one > recommomend me any books or

Re: [nodejs] Why is node-gyp written in python?

2014-02-19 Thread Angel Java Lopez
Ummm... but node-gyp IS USING gyp https://github.com/TooTallNate/node-gyp/tree/master/gyp It is not only read the config file, and voila! to get rid off python, the gyp logic should be rewritten in JavaScript Am I right? On Wed, Feb 19, 2014 at 11:44 AM, Alex Kocharin wrote: > > Can a gyp pa

Re: [nodejs] Why is node-gyp written in python?

2014-02-18 Thread Angel Java Lopez
Yes, he wrote the post http://www.codinghorror.com/blog/2007/07/the-principle-of-least-power.html http://www.codinghorror.com/blog/2009/08/all-programming-is-web-programming.html On Tue, Feb 18, 2014 at 9:48 AM, Kevin Ingwersen wrote: > > Am Di. Feb. 18 2014 12:15:49 schrieb Alex Kocharin: > > >

Re: [nodejs] Re: JS function and variable problem

2014-02-17 Thread Angel Java Lopez
My first attempt: to start socket.io listening ONLY after retrieving the initial values from DB (I presume your led data can be retrieved via ledxx.get(), If this code works, then you could refactor a bit, to a clear initialization, now all the code is inside a "big" callback. But, baby steps ;-)

Re: [nodejs] Re: How MEAN have you got :-)

2014-02-17 Thread Angel Java Lopez
y functionality implemented as server pages. Angel "Java" Lopez @ajlopez On Mon, Feb 17, 2014 at 5:00 AM, Babu Subramanian < babu.subraman...@gmail.com> wrote: > Thanks guys for the responses! > > >>Content-driven apps like Pinterest, Instagram etc. should be usable &

Re: [nodejs] JS function and variable problem

2014-02-17 Thread Angel Java Lopez
back of CouchWrite // CouchRead(); <-- not here function CouchWrite(cb) { couchdb.db.destroy('udoodb', function() { couchdb.db.create('udoodb', function(err) { if (err) {throw err; } var doc1 = { sw1:false, sw2:false, sw3:false }; db.insert(doc1,'4662745328718336

Re: [nodejs] Why is node-gyp written in python?

2014-02-16 Thread Angel Java Lopez
d for many other tasks in gyp. Curiously, I cannot find Python listed as a dependency of gyp, file/readme? I'm not sure the python version required/support (2.6? 2.7? 3.x?) Angel "Java" Lopez @ajlopez On Sun, Feb 16, 2014 at 7:12 AM, Gagle wrote: > I mean, it's a ver

Re: [nodejs] Trying to build a simple configurable proxy to reroute ajax requests to another domain

2014-02-09 Thread Angel Java Lopez
member now the exact form, check express site) And require('express') DOES NOT look for a global express. C'est la vie ;-) Angel "Java" Lopez @ajlopez On Sun, Feb 9, 2014 at 2:58 PM, David Karr wrote: > I'm working on a small webapp that normally is buil

Re: [nodejs] Is it optional to add the err argument to callbacks?

2014-02-06 Thread Angel Java Lopez
As @tootallnate said, arg is mandatory But an alternative is dosomething( ., function (err, data) { if (err) { ; return; } myfunc(data); }); function myfunc(data) { } On Thu, Feb 6, 2014 at 6:42 AM, Nathan Rajlich wrote: > Nope. The `err` arg is mandatory. Sorry. > > > On Thu, Feb

Re: [nodejs] A really silly-novice question about events

2014-02-06 Thread Angel Java Lopez
A refinement source.on("radiation", function (dataradiation) { sink.process(dataradiation) }); could be written as source.on("radiation", sink.process); On Thu, Feb 6, 2014 at 6:56 AM, Angel Java Lopez wrote: > The line > > sink.on("radiation&q

Re: [nodejs] A really silly-novice question about events

2014-02-06 Thread Angel Java Lopez
ource.on("radiation", function () { sink.dosomething() }); Angel "Java" Lopez @ajlopez On Wed, Feb 5, 2014 at 8:45 PM, q2dg2b wrote: > Hello friends > > I don't know why this code doesn't work: > > var source = new (require("events").Event

Re: [nodejs] Re: Konfig : Config management module. Automatic, environment specific and dynamic.

2014-02-04 Thread Angel Java Lopez
Hand written, not tested, using expression expansion of ${ } using simpletpl https://github.com/ajlopez/SimpleTpl/blob/master/test/templateWithModel.js You can put js expressions not only variables, in ${ } var simpletpl = require('simpletpl'); ```js var object = { name: 'bu++', cflags: '-s

Re: [nodejs] Easiest way to divide headers from document?

2014-02-01 Thread Angel Java Lopez
something like var position = fullText.indexOf("\r\n\r\n"); var headertext = fullText.substring(0, position+2); var header = parseHeaders(headertext); var body = fullText.substring(position + 4); On Sat, Feb 1, 2014 at 8:28 PM, Kevin Ingwersen wrote: > Ohai. > > For a - local! - project that I

Re: [nodejs] CrowdProcess - Node.js Module

2014-01-30 Thread Angel Java Lopez
tly produce new jobs with new data sets. Angel "Java" Lopez @ajlopez On Thu, Jan 30, 2014 at 7:15 AM, Angel Java Lopez wrote: > Interesting! > > It's not clear to me from documentation (program to send > properties/characteristic are not listed). but: > > - Pr

Re: [nodejs] CrowdProcess - Node.js Module

2014-01-30 Thread Angel Java Lopez
tion to submit using node client How to submit a program instead of a function in node client? My first guess: you can specify the program as string in an option object. Angel "Java" Lopez @ajlopez On Wed, Jan 29, 2014 at 11:04 PM, Alex Kocharin wrote: > > It requires an ASIC

Re: [nodejs] Cache variables?

2014-01-29 Thread Angel Java Lopez
pected but make senses, or the result is garbage, not expected, non sense). Angel "Java" Lopez @ajlopez On Wed, Jan 29, 2014 at 7:39 AM, Anto wrote: > Hello > > It has failed again despite all this, the variables have the right data > but once fault does not display prope

Re: [nodejs] New to Node - Integrating with existing project?

2014-01-23 Thread Angel Java Lopez
I mentioned at the start of this email, I presume you need server logic Alternatives? Angel "Java" Lopez @ajlopez On Thu, Jan 23, 2014 at 2:08 PM, Nick Dugger wrote: > Hey there, I've recently started a project, and I need a server for it. I > don;t wan to simply drag it

Re: [nodejs] Many timers vs. one global long running timer

2014-01-19 Thread Angel Java Lopez
that expires in that minute - A global timeout of 1 minute, reviewing the next minute/property in such object. But I don't grasp your use case. What is "revalidate an object"? Why you need to do that? Maybe, there are other options in Node.js world. Angel "Java" Lopez @ajlo

Re: [nodejs] nodejs serial?

2014-01-06 Thread Angel Java Lopez
I can't remember, but maybe you need to run npm install from Visual Studio Command Prompt not sure On Mon, Jan 6, 2014 at 6:39 PM, Mark Hahn wrote: > BTW, by researching the node-gyp docs I see that visual studio and python > need to be installed for any windows node-gyp build. I didn't re

Re: [nodejs] Distributed workers recommendations

2013-12-26 Thread Angel Java Lopez
. Angel "Java" Lopez @ajlopez On Thu, Dec 26, 2013 at 10:41 AM, Daniel Rinehart wrote: > At my last company we had good success with coffee-resque backed by Redis > with a little custom coding around it. Each worker was an independent > process that was managed and kept aliv

Re: [nodejs] Distributed workers recommendations

2013-12-26 Thread Angel Java Lopez
icted above, but it could give more context http://ajlopez.wordpress.com/2013/05/30/aplicaciones-distribuidas-y-node-js/ Angel "Java" Lopez @ajlopez On Thu, Dec 26, 2013 at 8:04 AM, AlainM wrote: > How does this fit in NODE.JS?? > > What you describe does, not seem like async

Re: [nodejs] Distributed workers recommendations

2013-12-26 Thread Angel Java Lopez
essage from the task queue. FE is reading the response queue, and associate the task id with a pending response callback, to send the response Makes sense? (in bad English ;-) Angel "Java" Lopez @ajlopez On Thu, Dec 26, 2013 at 4:49 AM, Floby wrote: > This is an interesting subject.

Re: [nodejs] Hotnode, where are you?

2013-12-17 Thread Angel Java Lopez
Ummm... maybe you need to install hotnode as global: npm install hotnode -g to run the verb "hotnode" Any clue in the tutorial? On Tue, Dec 17, 2013 at 4:14 PM, Orthoducks wrote: > I'm trying to set up an environment where I can start messing around with > Node.js. My first goal is to run on

Re: [nodejs] Connecting PHP and Node with Redis Pub/Sub and SockJS

2013-11-19 Thread Angel Java Lopez
stributed nodes. Angel "Java" Lopez @ajlopez On Tue, Nov 19, 2013 at 6:13 AM, Patrick Hund wrote: > Let's face it — modern webdev is all about real-time. You want to get the > data as soon as possible, ideally as it's published by users or pushed by > data provid

Re: [nodejs] Equivalent to process/thread Id of a CGI application for logging?

2013-11-15 Thread Angel Java Lopez
Sorry, bad thread. The response is about "npm in production" On Fri, Nov 15, 2013 at 7:42 AM, Angel Java Lopez wrote: > I have no experience in big production deploys, but I see other teams > using: > > https://npmjs.org/doc/shrinkwrap.html > > But > Caveats >

Re: [nodejs] Equivalent to process/thread Id of a CGI application for logging?

2013-11-15 Thread Angel Java Lopez
other mechanism that can verify contents rather than versions. There was a discussion(s) in this list about deploying directly the node_modules directory in some cases. I have no link now Angel "Java" Lopez @ajlopez On Fri, Nov 15, 2013 at 7:09 AM, Stefan Klein wrote: > Hi List

Re: [nodejs] [Poll/RFC] Remove the built-in debugger

2013-11-12 Thread Angel Java Lopez
I never use that debugger. console.log and TDD are my close friends ;-) Angel "Java" Lopez @ajlopez On Tue, Nov 12, 2013 at 1:27 PM, Fedor Indutny wrote: > I have used it a lot recently too. > > On Tue, Nov 12, 2013 at 8:21 PM, Forrest L Norvell > wrote: > >

Re: [nodejs] NodeJS and PythonJS

2013-11-12 Thread Angel Java Lopez
avaScript ;-) Angel "Java" Lopez @ajlopez On Tue, Nov 12, 2013 at 5:18 AM, Harts Antler wrote: > PythonJS is a Python to JavaScript translator like Brython, but produces > faster output code than Brython, see this > post<http://pyppet.blogspot.com/2013/11/brython-

Re: [nodejs] module.export

2013-11-11 Thread Angel Java Lopez
xport myfunction, but you can include it in the about module.exports = { ... } Angel "Java" Lopez @ajlopez On Mon, Nov 11, 2013 at 3:43 PM, Charles Angel wrote: > I'm new to Node.js and finally making some headway before running into > module.exports > > I wanted to separat

Re: [nodejs] Re: Just started used node, is something like this possible and how?

2013-11-06 Thread Angel Java Lopez
s_options to listen to the output, not at end. (take into account that some programs don't give the output while running, only at end; I see C programs without calling flush()) Why now you are using require('net')? Where is the spawned process? Or you have ONLY one external process to at

Re: [nodejs] node.js and promise

2013-10-18 Thread Angel Java Lopez
I just found this link at es-discuss http://flippinawesome.org/2013/10/14/a-simple-visual-model-for-promises/ On Fri, Oct 18, 2013 at 7:34 PM, Gorgi Kosev wrote: > Try http://spion.github.io/promise-nuggets - its not complete yet but the > main concepts are covered > On Oct 19, 2013 12:11 AM,

Re: [nodejs] web app programming as if it were a desktop app over socket.io

2013-10-18 Thread Angel Java Lopez
Hi! Loosely related, the other day I found: http://www.codeproject.com/Articles/410856/Canvas-Control-Library-and-New-Forms-Based-System https://github.com/akshaysrin/CanvasControlLibrary On Fri, Oct 18, 2013 at 4:18 AM, Eric Reynolds wrote: > That sounds great, I am just wondering though, tha

Re: [nodejs] Re: Bachelor Project - ideas?

2013-10-12 Thread Angel Java Lopez
I understand that: DHT = Distributed Hash Table WebRTC = real-time browser-to-browser Where is node.js in this equation? But yes, it could be a nice project Doing my google homework, I just discovered http://www.nodetron.com/ Angel "Java" Lopez @ajlopez On Fri, Oct 11, 2013

Re: [nodejs] [ann] JS-Git Milestone #1

2013-10-11 Thread Angel Java Lopez
Great! I just found this link: http://blog.pluralsight.com/2013/10/04/tim-caswell-on-the-development-of-js-git/ via Coder Post http://coderpost.org/?edition_id=b51afe00-327e-11e3-8aec-002590721286 Angel "Java" Lopez @ajlopez On Tue, Oct 8, 2013 at 4:22 AM, alessioalex wrote: &g

Re: [nodejs] Node.js module for interfacing Microsoft Windows .NET

2013-10-02 Thread Angel Java Lopez
I don't try it, but there is http://tjanczuk.github.io/edge/#/ http://www.infoq.com/articles/the_edge_of_net_and_node http://www.infoq.com/news/2013/03/edgejs My links http://delicious.com/ajlopez/nodejs,dotnet Loosely related http://javascriptdotnet.codeplex.com/ Angel "Java"

  1   2   3   >