emailserver

https://quilljs.com/




gcloud config set project  email-245122; gcloud config set account m.shahriarinia@gmail.com ;  gcloud beta compute --project "email-245122" ssh --zone "us-central1-c" "instance-1"


gcloud config set project spotify-spodnik; gcloud config set account mortezas@spotify.com # gcloud beta compute --project "spotify-spodnik" ssh --zone "us-central1-a" "mortezas-instance-1"




https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions-enterprise-linux-fedora-and-snap-packages
https://github.com/nodesource/distributions/blob/master/README.md


sudo npm install express-generator -g
express email-server --view=pug  
cd email-server
npm install
sudo ufw allow http
sudo ufw allow https
sudo PORT=80 nodemon

add firewall rule for port 3000 for node
Add the firewall tag to the instance

nodemon OR npm start

DEBUG=email-server:* npm start
DEBUG=email-server:* nodemon


 npm install --save marked     https://marked.js.org/#/README.md


downgraded node to 11.15.0 link

https://www.npmjs.com/package/webshot

npm install --save webshot


To generate image puppeteer is the correct solution
$ npm install --save puppeteer
this should have been enough according to doc, bit didn't
const puppeteer = require('puppeteer');


(async () => {
  const browser = await puppeteer.launch({args: ['--no-sandbox']});
  const page = await browser.newPage();
  await page.goto('http://owlcommand.com');
  const img = await page.screenshot({path: 'example.png'});
  res.send(img);

  await browser.close();

})();




setup mysql



✉≈≈








Comments