Skip to content

Instantly share code, notes, and snippets.

View fngadiyo's full-sized avatar
😁
glad you are here!

Fadly fngadiyo

😁
glad you are here!
View GitHub Profile
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active June 19, 2024 00:37
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@Alek-S
Alek-S / CSVDownloadExample.js
Last active May 27, 2024 04:03
Send CSV to client of in-memory data, without writing CSV on the server
// will generate CSV from in-memory data
// client will download as CSV without server having to save the file
//requries json2csv from npm
//ref: https://stackoverflow.com/questions/45922074/node-express-js-download-file-from-memory-filename-must-be-a-string
const json2csv = require('json2csv'); //from NPM
const stream = require('stream'); //Native Node
/*