Skip to content
Advertisement

Tag: node.js

Node JS process running under PM2 and file permissions

I have a small node.js (v13.5.0) server running under PM2 (v4.4.0) on a RHEL 7.6 box. As a part of it’s function it writes a small CSV file to the disc for every incoming request. This app is writing these files with the perms (rw-r—–). The user I am having PM2 executing my process as has umask set to 0022.

Bash export variables but only for current command

I want to load some environment variables from a file before running a node script, so that the script has access to them. However, I don’t want the environment variables to be set in my shell after the script is done executing. I can load the environment variables like this: However, after the command is run, all of the environment

nvm needs curl or wget to proceed

I wanna install node from nvm, but i run into problem ‘nvm needs curl or wget to proceed’ My operating system is debian9,nvm version is v0.35.2 how to fix it? here is the nvm debug result and the type curl/type wget results Answer put this into bashrc file then source ~/.bashrc

Can’t install latest angular cli on ubuntu

I’m trying to install angular via ubuntu. When I type the version commande node -v I get v12.14.1 Then I try to install npm package sudo npm install -g @angular/cli I get a warning npm WARN npm npm does not support Node.js v10.15.2 ng version I get angular-cli: 1.0.0-beta.28.3 The npm version is 6.13.4 Answer The issue here seems to

node script just stops

I have a very large multi section script with a LOT of loops and some recursion in it. When I run it on a Very Large dataset, the script will simply stop running. It stops with a 0 exit code. It VERY clearly does not actually finish running…it just…stops. What I’m looking for: Why would a script just stop mid

How do I extract data from df ~ onto my website?

I am creating a pie chart which shows how much disk space is available/used on my linux box. However, I am unsure how to parse the data onto a microservice url. Help will greatly be appreciated. Here is what I have at the moment: Router: Controller: Answer You might try the approach below, we create a row object for each

Advertisement