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.
Tag: node.js
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
I can’t start node.js on hosting
I am trying to install my node.js server in hosting. The server running on Windows but not work in hosting. RUN NPM INSTALL ERRROR START SERVER ERROR Answer You need to stop the application before running NPM install. That should fix it
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
Can I run 2 node.js express using https on 2 specific ports?
I am facing an issue that I am not able to solve alone. I am running 2 node.js server instances on my linux server, but the one running on port 4000 is running well, but the one running on the port 6000 is not working. See below the example: Port 4000: Port 6000: I checked my port on my server
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
Add a job to linux cron list programmatically with Nodejs
I have a job with Nodejs that I want to do it each 30 minutes to scan the Database and Update Products Data in An Ecommerce API with my Nodejs Program, note that the Nodejs Program is serving an REST API (Backend) for a react js web application So I searched for that and I found that I can do
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
Ghost – Can’t connect to the bootstrap socket (localhost 8000) ECONNREFUSED
I have been trying for a long time to debug my ghost blog as you can see here. I have made some progress the problem seems to be related to an error on the bootstrap socket of ghost. My config.production.json in my Digital Ocean server is: When running ghost run I get: Update Its running on Ubuntu 18.04.3 LTS Node