[nodejs] Re: I am trying to connect with mongodb database but it throws some kind of error I am unable to understand

2020-07-27 Thread Zlatko
Hi there, On Sunday, July 26, 2020 at 2:09:29 AM UTC+2, Aman Kr Sharma wrote: > > > > (node:94165) DeprecationWarning: current Server Discovery and Monitoring > engine is deprecated, and will be removed in a future version. To use the > new Server Discover and Monitoring engine, pass option {

[nodejs] Re: Failed: Trying to use handlebars in NodeJs using Expressjs

2020-07-22 Thread Zlatko
n.handlebars'``` > > This is what I am doing ```app.engine("hbs", expressHbs()); > > Does this file exist? Can you show the one including this "main.handlebars" as well? Zlatko -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/98862

[nodejs] In a node (express) route using mongoose, which of these 2 methods is superior to ensure that an object is added to a collection?

2019-01-24 Thread Zlatko
, but brings in a much easier to maintain code, reusability etc. Hope that helps. Zlatko -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines

[nodejs] Re: Leaving NodeJS after years of learning and writting projects - Back to PHP

2018-12-28 Thread Zlatko
g strategies for PHP for the same projects? If you wanna make a comparison, you'd need to compare much more about how you approach your work. Otherwise, it really is back to the nineties, with all the nineties horror stories with it. Zlatko -- Job board: http://jobs.nodejs.org/ New

[nodejs] Re: Why the email is not sending

2018-12-07 Thread Zlatko
from a certain IP address or range, or such combinations. Did you check here? https://support.google.com/mail/troubleshooter/2920052?visit_id=636797743968862672-3109617686=en=2 Zlatko On Thursday, December 6, 2018 at 5:21:56 PM UTC+1, Ryan Liu wrote: > > I was trying to send a mail thro

[nodejs] publish node js with mongoDb in windows server

2018-10-16 Thread Zlatko
Hello, I haven't seen Plesk in years, but googling got me to this page which says you need to install MongoDB in a Docker container: https://support.plesk.com/hc/en-us/articles/115004540294-How-to-install-MongoDB-database-server-in-Plesk- Have you tried that? -- Job board:

[nodejs] Unexpected token _ at Object.parse (native)

2018-10-08 Thread Zlatko
Hello, In addition to what the others suggested, I'll suggest removing the outer, double quotes around your thing and it's going to be an object instantly, no de-serialization needed. That depends on your use case, though, but in the example you provided, it will work's Zlatko -- Job board

[nodejs] Custom class object as Key in a Map

2018-09-29 Thread Zlatko
Yes, in pretty much the same way: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map There's more on that link, like Setc and WeakMap, so check them out, see what works best for your use case. -- Job board: http://jobs.nodejs.org/ New group rules:

[nodejs] Passport how to authentication between services ?

2018-09-29 Thread Zlatko
Well, as you've said yourself, your first project uses passport-mongodb or similar authentication strategy. What does your second project use? Are you accessing it exclusively server-to-server or also regular fashion, from a client? If it's server to server, do you need to also pass along

Re: [nodejs] Re: javascript vision thing

2018-09-22 Thread Zlatko Đurić
, how come his same-all troll ramblings always pass the mods?) Zlatko On Sat 22. Sep 2018 at 18:26, Michael J. Ryan wrote: > Considering how many js devs fail to answer "what values evaluate to false > in JavaScript". It isn't the new features that are the problem. > >

Re: [nodejs] Re: right way to use nodemailer and nodemailer-smtp-pool

2018-08-15 Thread Zlatko Đurić
group and all its topics, send an email to > nodejs+unsubscr...@googlegroups.com. > To post to this group, send email to nodejs@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/nodejs/119a2265-c244-4cc7-86ef-f56de0512634%40googlegroups.com &g

[nodejs] Re: right way to use nodemailer and nodemailer-smtp-pool

2018-08-08 Thread Zlatko
t to 1, so this is also per-domain configurable. These are the reasons services like mailgun do well - they gather a lot of specific knowledge about individual domains. Zlatko On Tuesday, August 7, 2018 at 6:35:22 PM UTC+2, sunshine o wrote: > > "Mail Command Failed: 421 #4.x

[nodejs] Re: Check if internet connection is working behind a proxy

2018-05-02 Thread Zlatko
>From client's perspective, navigator check doesn't care nor sees proxies. It >tries to do a connection and that's it. Alternatively look at what you've got. Internet-available makes a dns query, but your proxy/firewall does not allow direct communication. But a simple http fetch should work,

[nodejs] Re: Node.js Long running Task scenario

2018-03-13 Thread Zlatko
Hi MrNode, This is way too generic task description to be node-specific. We don't know how is the file processed. We don't know how is this CSV processing needs to be atomic or not - it seems yes, but not clear. We don't know if you can abort it or not. We don't know if you want to block the

[nodejs] Re: Remove BOM from Google supported devices csv

2018-03-12 Thread Zlatko
Not sure if it helps, but here's what worked for me on a recent project: payload = payload.replace('\ufeff', '').replace(/rn/g, '') .replace(/\\"/g, '"'); Hope it helps? -- Job board: http://jobs.nodejs.org/ New group rules:

[nodejs] Re: Taking Node-report of already running process

2018-03-08 Thread Zlatko
Well, did you look at the docs ? "can also be triggered by sending a USR2 signal to a Node.js process" So, `kill -USR2 ` should do the trick. Btw, their docs say you can do this: var nodereport = require('node-report');nodereport.triggerReport(); So if

[nodejs] Re: Are functions which defined using eval or new Function() optimized?

2018-03-03 Thread Zlatko
Hi Koray, Apparently, the answer to your original question is "yes", functions generated by "eval" or "new Function()" will get optimized. I've asked one of the V8 developers on Twitter, he even referred on how Webpack (pretty popular and well known JavaScript package) achieves crazy

[nodejs] Re: Are functions which defined using eval or new Function() optimized?

2018-03-02 Thread Zlatko
Hi, Good question! V8 Googlers say nothing eval does is optimized and almost absolutely must be avoided (and they same for Function constructor IIRC) - but what about the product of it? I don't know, maybe you can run a few tests with v8-debug. I would be interested in results if you do run

[nodejs] Re: how to Auto-generate models in nodejs

2018-03-01 Thread Zlatko
As an alternative to ejs, you might be able to use something like Swagger and one of it's plugins. -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules:

[nodejs] Re: Allowing access to an endpoint under a condition?

2018-02-01 Thread Zlatko
Like Warner has said, take a database. Something like redis, in this case. Or even a free hosted offering, if it is not mission critical. Or get a firebase client. In any case, some external persistent way of storing and retreiving this. As an aside, it would probably be better to make

[nodejs] Re: Performance implications if next is not called in the middleware?

2017-12-28 Thread Zlatko
On Wednesday, December 27, 2017 at 8:18:51 AM UTC+1, node...@gmail.com wrote: > > In the middleware function, to move on to the succeeding middleware > function, we need to invoke the next function. As we all know, if we omit > the call the next() function, the request will be hanging. In

[nodejs] Re: How best to deploy NodeJS commandline application

2017-11-30 Thread Zlatko
Hi Michael, node-deb is one way to distribute that package. But since your users will have to have a node binary on the system anyway, you can still use npm, just publish the app in a private namespace. Name your package with the org scope, e.g. my private packages on npm are scoped to

[nodejs] Re: New to node.js. Need help with Node application running through Apache web server

2017-11-14 Thread Zlatko
Hi, On Friday, November 10, 2017 at 12:07:56 AM UTC+1, Kyle Hall wrote: > > > In order to view the application off our VPN, we set up an Apache proxy to > our public-facing test URL: http://www.testdomain.com/calendar. The > application runs, but none of our CSS or JS files show up. They are

[nodejs] Re: Synchronous for loop

2017-10-25 Thread Zlatko
On Wednesday, October 25, 2017 at 7:38:37 AM UTC+2, gupta@gmail.com wrote: > > Here is my code. Its a simple one > for(var a=0; a var dId = dResponse[a].dId; > console.log('dId-->' +dResponse); > var dUrl = url?id=' + dId; >

[nodejs] Re: help beginner with basic app

2017-09-25 Thread Zlatko
Hello Anton, Did you try with nodeschool.io tutorials? Those are really great to get you started. Also, they start from the basics and are relatively up-to-date. Also, they teach you the core principles so even when modules change later, you can still figure out what's going on. But that's

[nodejs] Re: What is the below express router doing

2017-09-07 Thread Zlatko
Hi, On Wednesday, September 6, 2017 at 4:15:19 PM UTC+2, Rohan Pota wrote: > > > 1. How does `Promise.all()` work ? > Promise.all works like this: you give it *an array* of promises, and it returns

[nodejs] Re: Disconnecting frequently after updating Node.js v6.9.4

2017-07-31 Thread Zlatko
Few suggestions from me: On Sunday, July 30, 2017 at 9:57:54 PM UTC+2, k yosimoto wrote: > > >- Update versions > - node.js@6.1.0 → 6.9.4 > - socket.io@1.4.6 → 1.7.2 > - express@4.13.4 → 4.14.0 > - body-parser@1.15.1 → 1.15.2 > - jquery@2.2.3 → 3.1.1 > -

[nodejs] Re: Hot reload plugin for node.js

2017-07-31 Thread Zlatko
Hi, I really do not think this is production ready. 1. Simple async code. Simple example: // m1.js const label = 'Hi world'; setInterval(() => console.log('From m1:', label), 1000); exports.label = label; // m2.js const dload = require('../index'); const mo = dload.new(); mo.fs =

[nodejs] Re: outside for loop var value is undefined

2017-07-24 Thread Zlatko
The problem is that your last console.log line runs before anything else. I don't see the rest of the code, but I suspect if you move your *return resolve(countRepetidos);* 2 lines up (right behind that *if(data.count>0) {}* block), your promise will resolve proper value. Likewise, if you put

[nodejs] Re: ShelljsExec return \n on parsing

2017-06-19 Thread Zlatko
You can try a simple parseFloat: const balance = parseFloat(data); Just make sure you get an actual number. On Sunday, June 18, 2017 at 7:12:46 AM UTC+2, Woukaine Beyond wrote: > > Hi, > > I use this script for get my bitcoin balance : > > app.get('/GET/MY/BITCOIN/BALANCE', function (req, res)

[nodejs] Re: Schedule function and leave the page nodejs

2017-06-16 Thread Zlatko
On Friday, June 16, 2017 at 3:43:09 AM UTC+2, Aaron Aben Danan wrote: > > I'm building a node.js app and I need to schedule a function and let the > user surf on my website. Is it possible ? > > If i wasn't that clear, here is an example : > Let's say a user comes on my index page. From this

[nodejs] Re: NodeJS REST API

2017-05-19 Thread Zlatko
On Friday, May 12, 2017 at 1:19:26 AM UTC+2, Kameron Berget wrote: > > > Should the require('mssql'), config and connect statements really be > inside the GET? That would mean that I have to repeat the config > (connection) settings in each method on each endpoint. Where would be the > best

[nodejs] Re: how can i write a string data using fs

2017-05-19 Thread Zlatko
Few things, one really important: *You shared your API token with the world!* If you can, delete that token and in the future, replace it with a placeholder when you're posting examples. Second, *request* you can handle errors in streams, e.g. *

[nodejs] Re: How common is it to restart a NodeJS app?

2017-05-07 Thread Zlatko
On Sunday, May 7, 2017 at 12:32:15 AM UTC+2, lawrence...@gmail.com wrote: > > Do you keep track of how often your app dies and is restarted? > > Nope, not directly. But I do scan the logs from time to time to check if there's something unusual (including restarts). > Of the die/restart

[nodejs] Re: How to Improve Node .js performance

2017-05-07 Thread Zlatko
On Sunday, May 7, 2017 at 12:32:08 AM UTC+2, lawrence...@gmail.com wrote: > > I occasionally see things like this in the log, but this simply kills the > app. This does not return nicely formatted JSON, which just happens to lack > the right data. > > It does, however, stall, for a very long

[nodejs] Re: Why would a NodeJS app give bad data when it is under stress?

2017-05-04 Thread Zlatko
> > > Any thoughts on why this might happen when the load is high enough? > > Interesting read! I would love to see that code, this way I can only speculate that even though you think your code is all synchronous, it is, in fact, not. Perhaps one of the functions or libraries has an implicit

[nodejs] Re: Export variable - ExpressJS

2017-05-04 Thread Zlatko
On Wednesday, May 3, 2017 at 11:55:59 PM UTC+2, Peter B. wrote: > > > I need your help. I'm working on a project and I have a problem with the > fact that nodejs is asynchronous. > I want to export my variable called 'macAd'. But even with a global > variable, I can't do it. > If I

[nodejs] Re: Node application - request & response

2017-04-20 Thread Zlatko
On Wednesday, April 19, 2017 at 2:42:02 AM UTC+2, SC wrote: > > Hi, > > I have a nodejs application, in which I am making a call to another rest > service. > > When I directly call that rest service from a simple request response node > application, it works just fine from the command line. >

[nodejs] Re: Can we Run an app with Node Js on Mobile ?

2017-03-01 Thread Zlatko
On Tuesday, February 28, 2017 at 6:35:59 PM UTC+1, Manpreet kaur wrote: > > My basic requirement is to build an app with nodejs that can run on > desktop and mobile also.So is its possible to Run Node on Mobile and what > would the possible solution for it? > Depending on what specifically you

[nodejs] Re: Store images in node.js express web site

2017-02-07 Thread Zlatko
On Monday, February 6, 2017 at 9:29:21 PM UTC+1, אלה וייס wrote: > > . > I put my images in a directory inside node.js public folder > > :in order to be able to read all images from folder using $.ajax > > (((app.use('/albums',serveIndex(path.join(__dirname,'public/AlbumImages > >

[nodejs] Re: How to communicate 2 node server with high performance.

2017-02-07 Thread Zlatko
On Monday, February 6, 2017 at 9:29:07 PM UTC+1, Arun Kumar Raga wrote: > > Hi All, > > 1) How can i share the global variables in node cluster environment, > Currently i am using *NEDB >

[nodejs] Re: Advice please .... risks with "no standard" manipulation of packages in node_modules

2016-12-01 Thread Zlatko
On Wednesday, November 30, 2016 at 6:46:33 PM UTC+1, Tom Fennelly wrote: > > Hi. > > I'm just wondering what might be the risks associated with manipulating > the contents of the node_modules folder outside the normal "npm install" > etc commands. IOW ... are there reasons why the a raw "drop

[nodejs] Re: Tips for finding runaway CPU bugs

2016-10-12 Thread Zlatko
Although it's a CPU issue, a heapdump could still be useful. There are ways to do it, such as https://www.npmjs.com/package/heapdump. You can try to get a dump once the CPU goes up and simply load it into Chrome dev tools - to see what is going on, perhaps there's a hint. If while at 100% you

[nodejs] Re: Business objects retained by Global Handles in heap dump

2016-10-10 Thread Zlatko
On Sunday, October 9, 2016 at 7:56:11 AM UTC+2, Russ Frank wrote: > > I have a heap dump (obtained with bnoordhuis/node-heapdump) of a > production node process that had a large heap. I found a bunch of business > objects retained by "(Global Handles)". I'm wondering how a JS object can > end

Re: [nodejs] Re: Question is this possible

2016-10-08 Thread Zlatko Đurić
ointers to where to begin will be greatly appreciated at this point > i do not know the exact amount of display i will need just want to make > sure this can be done. > > > > > > On Thursday, October 6, 2016 at 10:41:41 AM UTC-4, Zlatko wrote: >> >> Havi

Re: [nodejs] how to link to installed node packages / modules from another dir

2016-10-06 Thread Zlatko
As Ryan said, you can install the "shared" modules at a common parent directory. So if you have /*dir1/app1 *and /*dir2/app2*, you *could* have a /node_modules folder with those shared directories. However, it seems like a bad practice, updating one app might break the other. Are you trying to

[nodejs] Re: Returning binary data

2016-10-06 Thread Zlatko
Maybe Buffer.from(arrayBuffer) seems like it could help? https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length Basically a buffer from a typed array. Then stream that to client. -- Job board: http://jobs.nodejs.org/ New group rules:

[nodejs] Re: Question is this possible

2016-10-06 Thread Zlatko
Having 5 devices connect to different ports is fine, not a problem, but *why* do you want separate ports? You can have a single page and have it split into sections and have them all update. You can, at the same time, have 5 things connected somewhere. You can even make a link between those

[nodejs] Re: Multiple timeouts (lots of...)

2016-09-19 Thread Zlatko
5000 timers per se should not be a problem to measure nor a problem to the app. It's not even a strain to the connections: it amounts to approximately 83 pings per sec, which is not too much. But the bigger question is why do you want this? Just to keep sockets alive? You can set this option

[nodejs] Re: What is the best way for JavaScript to access data from Node.js/

2016-09-19 Thread Zlatko
app.set('view engine', 'ejs'); app.use(function(req, res) { fetchData() .then(data => res.render('my-file', data)) .catch(err => res.status(500).send('Server error.\n')); }); app.listen(8080, () => console.log('Listening on 8080')); You can then get your HTML with dat

[nodejs] Saving multiple files using Promises

2016-08-28 Thread Zlatko
You seem to be passing 2 args to your addresses.map() callback ( can't tell exactly on phone:(). But if you do, the second arg is simply used as function context ('this'). You don't use it so it's never called. Perhaps try something different: Promise.all(addresses.map (item =>

[nodejs] Re: [weird] console.log is not sync anymore when I use a stream, output is truncated when it s followed by process.exit

2016-05-24 Thread Zlatko
On Monday, May 23, 2016 at 4:57:29 PM UTC+2, mh-cbon wrote: > > Hi, > > I m facing a badly weird issue which i can t tell if it s a bug, or an > error from my side. > > It's not a bug, it's a feature :) Seriously, *console.log* is *asynchronous*, because it can involve disk I/O (e.g you run a

Re: [nodejs] Re: child_process and scaling

2016-05-21 Thread Zlatko Đurić
wrote: > Interesting. I wonder if it is better to use phantomjs for the PNG > rendering. Although it is slower, I don't need child_process > > On Fri, May 20, 2016 at 5:42 PM Zlatko <zladu...@gmail.com> wrote: > >> You have multiple things there. Thousands requests (per s

[nodejs] Re: child_process and scaling

2016-05-20 Thread Zlatko
better to just do job queues from the get-go. Hope that helps. Zlatko On Thursday, May 19, 2016 at 11:51:46 PM UTC+2, Alisson Cavalcante Agiani wrote: > > I need to develop a service where the user sends an array of values, I > generate a chart with d3.js and convert

[nodejs] Re: Problem in running nodejs script in mininet host.

2016-05-05 Thread Zlatko
On Wednesday, May 4, 2016 at 5:35:40 PM UTC+2, Reshma Roy wrote: > > Hi, > > I tries to run a nodejs code in a mininet host nodejs code.js and the > error i gets is follows : > > events.js:72 > throw er; // Unhandled 'error' event > ^ > Error: connect ECONNREFUSED > at

[nodejs] Re: REST API

2016-04-30 Thread Zlatko
On Wednesday, April 27, 2016 at 5:05:43 PM UTC+2, Sirine Ibn Fraj wrote: > > Hello everyone , > > I am trying to retrieve data from a REST API in the server side (*.js) and > display it in my view (*.jade) > > > I was able to get the data but was not able to send it to the view . > This

[nodejs] Re: Delay a Node Stream Transform process

2016-04-27 Thread Zlatko
Depending on how you implemented the transform stream, the pipeline should be balancing itself automatically. How did you implement the stream? Do you use object mode? Did you try to do something with highWaterMark? On Tuesday, April 26, 2016 at 6:34:05 PM UTC+2, Kayode Odeyemi wrote: > > Hi,

Re: [nodejs] calling a nodejs express REST service with into url

2016-04-06 Thread Zlatko
On Monday, April 4, 2016 at 3:11:15 PM UTC+2, Adrian Albu wrote: > > Yes but the problem is that they were using an old api that somehow worked > with this type of call and my new api has new REST calls but should work > also with the old ws type of calls, so when I did it I had example calls

Re: [nodejs] calling a nodejs express REST service with into url

2016-04-01 Thread Zlatko
On Friday, April 1, 2016 at 8:20:04 AM UTC+2, Adrian Albu wrote: > > That is not possible since I have no responsibility on that application, > belongs to another company and so on... > > I know is crap they encode the url so or something but... > It's not crap. They're simply not following

Re: [nodejs] A few newbie questions on Nodejs

2016-03-24 Thread Zlatko
On Thursday, March 24, 2016 at 6:43:50 AM UTC+1, Harry Simons wrote: > > On Thursday, March 24, 2016 at 7:51:35 AM UTC+5:30, Matt Sergeant wrote: >> >> On Wed, Mar 23, 2016 at 12:25 PM, Harry Simons >> wrote: >> >>> >>> For example, if an isolated and primarily an I/O

[nodejs] Re: Protecting package dependencies from malicious code from npmjs.com

2016-03-24 Thread Zlatko
On Thursday, March 24, 2016 at 3:21:41 AM UTC+1, Chris Hills wrote: > > As I understand it, a package author can un-publish their package on > npmjs.com, and somebody else can publish a package with the same name. If > I create a package depends on a package from npmjs.org, I have little >

[nodejs] Re: how to download json data in excel (.xlsx) format without using express.

2016-03-04 Thread Zlatko
On Thursday, March 3, 2016 at 7:11:14 AM UTC+1, Ajay Kumar Jaiswal wrote: > > > > >>> The recored set contains millions of record so if i convert it using npm >>> json2xls it makes busy the browser and server to converting json into xlsx >>> .so this approach i don't want to use. >>> >> > Even

[nodejs] Re: Finding: Syntax error unexpected end of file

2016-01-31 Thread Zlatko
In addition to other suggestions of finding this particular bug, you might also look into including sourcemaps when transpiling your ts code, for dev environment at least. It might help out with these kinds of issues. On Monday, January 25, 2016 at 8:48:08 AM UTC+1, Theodor Esenwein wrote: >

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

2016-01-31 Thread Zlatko
Of course you can use npm to download general JavaScript packages, and you can use them in the browser, if nothing, then manually. The simplest use case: npm install griddle-react --save That installs the pacakge in node_modules/griddle-react folder. >From there you can simply include

[nodejs] Re: File Access Permissions and Security of Node.js apps on Linux

2016-01-04 Thread Zlatko
Well, it should be no different then with other runtimes, like Rails or maybe a PHP app. `node` is a binary file, and when you run it, you run it as a certain user. This user can access some files on the system, and is blocked to others. Likewise, other users can access certain files owned by

[nodejs] Trying to build a MUD that allows Telnet and Web socket connections

2015-12-18 Thread Zlatko
Since it's a different protocol, your socket.io would listen on another port. So, I guess the game api itself is on abstract enough to be accepting player input and sending output in a common way, your connections protocols have to hook into this abstract API. Now, socket connections and

[nodejs] Re: need tutorial for nodejs+webrtc

2015-12-02 Thread Zlatko
Not a tutorial, but an actual project, it has some pretty neat usage examples: https://github.com/mafintosh/webrtc-swarm On Tuesday, December 1, 2015 at 8:38:09 PM UTC+1, Vighnesh Bheed wrote: > > Hello.. > Ive been wondering is there good tutorials out there for webrtc and > node.js>??. i

[nodejs] Sharing common endpoints between apps

2015-12-02 Thread Zlatko
I need to share an identical endpoint on two REST API servers in node. Let's call it `/items`. It's a CRUD-like endpoint, a bit extended with our specifics. We also inline apiDoc comments into our routers there so that the client devs can also reuse this. What are some good patterns to keeping

[nodejs] Re: Creating different arrays with differents elements from one array

2015-11-26 Thread Zlatko
either form or format). Zlatko On Thursday, November 26, 2015 at 2:48:41 AM UTC+1, Diego Mayorga wrote: > > Hi all, i'm trying to do this, I have an array that looks like this: > > [ { rId: { id: '123455667' }, > form: 'layer', > timeStamp: '2015-11-20T10:28:26

[nodejs] cache-control mechanism for yeoman (angular+node) application.

2015-11-19 Thread Zlatko
There are a few ways to do that, but I find adding gulp-rev build step the easiest to think about. It's a build step, meaning it's done before you commit your changes and it gives you a hash of the file content. So if you change even a single character, you have a new hash for that file. So

[nodejs] Re: As someone new to Node, should I use Babel or plain ES6 in Node v5?

2015-11-05 Thread Zlatko
This depends a little on what you plan to do with your node-fu. If you plan to learn a bit more, maybe work on your personal projects or start something new in a new company, then I think you should just start with Node 4 (the TLS version) and write "native" ES6. Even if you're just learning

[nodejs] Re: Calculate statistics

2015-11-03 Thread Zlatko
That is really a too wide question. The general answer is that you can (of course) use both. But which one is better? It depends on so many things, your use cases, your current codebase, where is all the data being held, what kind of business inteligence and what kind of statistical

[nodejs] Re: what are the merits / demerits of require.extensions?

2015-10-12 Thread Zlatko
n what it does, and everything works as intended. That's how I would like this to play out. Though, I'm not the core maintainer, not even a contributor, so my complains and wishes wouldn't count anywhere as it is, would they? Zlatko -- Job board: http://jobs.nodejs.org/ New group rules: https:/

[nodejs] Re: State of ES6/ES7 in node/v8?

2015-10-05 Thread Zlatko
You can write full ES6 apps and transpile with babel.js. It's very feature complete, even has stage 1 and stage 0 features (ES7 and onward). It will also provide you with a polyfil, so it will add features that you miss as a polyfil. As for performance, this chart is a little old, but gives a

[nodejs] Re: Asynchroneous answer to the client with nodejs and socket.io... is it possible?

2015-09-27 Thread Zlatko
Yes, it is, it's quite easy, if your socket connection persists (or your server and client have means to reconnect if the socket is short-lived). Example would be something like this: ``` io.on('connection', function(socket){ socket.on('message', function(msg) { }) }); ``` On Friday,

Re: [nodejs] Possible to select globally installed module over locally install one?

2015-09-13 Thread Zlatko
What do you mean, they're not requireable? [zlatko@zlatko-mint /tmp]$ node -e "require('express')" module.js:338 throw err; ^ Error: Cannot find module 'express' [...cut...] [zlatko@zlatko-mint /tmp]$ npm i -G express \ [...cut...]

Re: [nodejs] Node/Express best practice regarding multiple apps on 1 instance

2015-09-09 Thread Zlatko
You're asking for best practices: nginx is it. Put nginx in front, and it will even be faster and better then node at ssl stuff, so your app only listens on one port. It is trivial to install, and it is simple to configure, read a little about node and nginx and multiple apps. DigitalOcean

[nodejs] Re: raspberry pi 2 B+ and node.js -- a drift and need a life perserver

2015-08-19 Thread Zlatko
Your code doesn't seem correct (nevermind the syntax errors). You also didn't post any potential results. These kinds of questions would be better off at stackoverflow.com, but here are a few pointers. The thing to realize here is that gpio.read and gpio.write are async functions, and your

[nodejs] Re: raspberry pi 2 B+ and node.js -- a drift and need a life perserver

2015-08-19 Thread Zlatko
Forgot the interval.cancel(): On Wednesday, August 19, 2015 at 11:28:41 PM UTC+2, Zlatko wrote: So let's write it: function doorInMotion (err) { // now is the trick. We want to check every second if the door is open. If yes, write a zero to opendoor pin, so that we stop the engine

Re: [nodejs] Re: Losing scope of variable

2015-03-20 Thread Zlatko Đurić
/nodejs/7972C72E-4E20-4AA0-B306-7EB4BD2CA915%40dinhe.net . For more options, visit https://groups.google.com/d/optout. -- Zlatko -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent

Re: [nodejs] Re: Cannot comprehend module-based inheritance and composition

2015-03-03 Thread Zlatko Đurić
-7b05be637fe7%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- Zlatko -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https

Re: [nodejs] Re: Support plugin system in Node.js

2015-02-03 Thread Zlatko Đurić
?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- Zlatko -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing

[nodejs] A module to empty an S3 bucket

2014-08-12 Thread Zlatko Đurić
elegant, but it works for me, so I thought it might help somebody else. Constructive criticism welcome. -- Zlatko -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing

Re: [nodejs] Re: Java Houses Adopting Node.js

2014-07-05 Thread Zlatko Đurić
from, Node is great. If you're doing video encoding and recoding, then yep, leave that part to Java. -- Zlatko -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki

Re: [nodejs] Re: Here's your Node.js performance tip of the week - how garbage collection works and how to monitor it

2014-06-27 Thread Zlatko Đurić
Where can one look for this code, write barriers and stuff? (I guess curiosity is getting the better out of me, or however the saying goes.) 2014-06-27 13:15 GMT+02:00 Zlatko Đurić zladu...@gmail.com: So that means that 'I guess that translates to create as many small local scoped vars as you

Re: [nodejs] Re: advice on a newcomer, how's the market for nodejs devs? Is it a good field to find remote type jobs/contract?

2014-03-05 Thread Zlatko Đurić
https://groups.google.com/groups/opt_out. -- Zlatko -- -- 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

Re: [nodejs] Re: Print form node

2014-02-10 Thread Zlatko Đurić
. -- Zlatko -- -- 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

Re: [nodejs] New module xpkg

2014-02-07 Thread Zlatko Đurić
://groups.google.com/groups/opt_out. -- Zlatko -- -- 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