Skip to content

Instantly share code, notes, and snippets.

View yurireeis's full-sized avatar
🎯
Focusing

Yuri Reis yurireeis

🎯
Focusing
View GitHub Profile
@yurireeis
yurireeis / How to create Node cli executable from npm.md
Created May 27, 2024 21:33 — forked from mritzco/How to create Node cli executable from npm.md
Create Node Package (cli) executable from npm scripts

Creating an executable NPM package and using it

This short guide explains how to create an NPM package that can be called as a script from another project. For clarity: The package to execute will be called: Module The place where you use it: Application

1. Build your module

Create a standard module ignore command line parsing

@yurireeis
yurireeis / letsencrypt_2020.md
Created June 23, 2021 00:06 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@yurireeis
yurireeis / 2019-https-localhost.md
Created June 23, 2021 00:05 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).