Skip to content

Instantly share code, notes, and snippets.

View crisluda's full-sized avatar

CrisLuda crisluda

View GitHub Profile
@crisluda
crisluda / production-web-server-setup-and-deployment-guide.md
Created February 22, 2025 14:38 — forked from journeymanavi/production-web-server-setup-and-deployment-guide.md
A runbook for setting up a Linux based secure, production web server, for serving static web content as well as deploying Node.js based web applications.
@crisluda
crisluda / .htaccess
Created March 6, 2024 10:14 — forked from nixta/.htaccess
.htaccess to add CORS to your website
# Add these three lines to CORSify your server for everyone.
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Methods "GET,PUT,POST,DELETE"
Header set Access-Control-Allow-Headers "Content-Type, Authorization"
@crisluda
crisluda / node_nginx_ssl.md
Created February 22, 2024 13:35 — forked from bradtraversy/node_nginx_ssl.md
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

@crisluda
crisluda / ImageController.js
Last active January 15, 2024 16:51 — forked from nesimtunc/ImageController.js
Minio Server - NodeJS - File Upload & Photo Showing Example
const formidable = require('formidable');
const fs = require('fs');
var Minio = require('minio');
let minioClient = new Minio.Client({
endPoint: config.MINIO.ENDPOINT,
port: config.MINIO.PORT,
accessKey: config.MINIO.ACCESS_KEY,