Anwar

Posts

Supervisord Reloading job auto when file change

Like Niush explains a queue:restart would be good enough in the deploy script. But if you really want to restart supervisor self in the forge quick deploy...

How to append to New Line in Node.js

function processInput ( text ) { fs.open(‘H://log.txt’, ‘a’, 666, function( e, id ) { fs.write( id, text + “\n”, null, ‘utf8’, function(){ fs.close(id, function(){ console.log(‘file...

How to append to a file in Node?

For occasional appends, you can use appendFile, which creates a new file handle each time it’s called: Asynchronously: const fs = require(‘fs’);   fs.appendFile(‘message.txt’, ‘data to...

Give a user an additional “email alias” address (sales@)

Example: If bill@solarmora.com wants a sales address for corresponding with customers, give him the email alias sales@solarmora.com. Mail sent to either address then appears in...

How to restart pm2 file change

Auto restart apps on file change PM2 can automatically restart your application when a file is modified in the current directory or its subdirectories: pm2...

pm2 not save after reboot

pm2 save is used to save the pm2 process list to relaunch them after a server reboot. It comes generaly with : pm2 startup which generates Startup...

What is the difference between pm2 restart and pm2 reload

The difference is documented here: As opposed to restart, which kills and restarts the process, reload achieves a 0-second-downtime reload. The latter means (found here): With reload, pm2 restarts all processes one...

How to expand an AWS Lightsail instance?

You would need to follow the instructions described here 783 for increasing the size of your instance’s disk volume. Once the volume resizing is completed, you can reboot...

Define your SPF record—Basic setup

Add your SPF record Sign in to the management console for your domain host and locate the page where you update DNS TXT records for...