Posts by Paulo Luan • 198 points
6 posts
-
1
votes1
answer651
viewsA: Module for Node Js that captures information from the Operating System and the computer
with the module you can get the CPU and memory information: const os = require('os'); console.log(os.cpus()); console.log(os.totalmem()); console.log(os.freemem()) The Module os-utils is also…
node.jsanswered Paulo Luan 198 -
0
votes1
answer210
viewsA: Rename Pdf file before opening for preview
Try to set the header of the content type server response to PDF and the Content-disposition name to the file name. Before the res.sendFile line something like: res.set({ 'Content-disposition',…
-
0
votes1
answer85
viewsA: Convert a stream to string?
If the Stream return is a buffer you can do something more or less like this: let string = '' stream.on('readable',function(buffer){ let part = buffer.read().toString() string += part…
-
0
votes2
answers220
viewsA: How does Nodejs manage package.json in sub-folders?
In NPM version 3.0 they fixed this problem: https://docs.npmjs.com/how-npm-works/npm3-dupe
-
5
votes2
answers220
viewsQ: How does Nodejs manage package.json in sub-folders?
How Nodejs manages Packages.json in sub-folders? You have your normal application but you have sub-modules that you want to have your own dependencies, how does Node manage it? It creates another…
-
9
votes3
answers1392
viewsQ: How to integrate Angularjs with common scripts?
My doubt started when I tried to use the Carousel twitter bootstrap inside an Angularjs project, it didn’t work at all. I found the angular-ui, solved my problem using this component, but my doubts…