Skip to content

Instantly share code, notes, and snippets.

View basharovV's full-sized avatar
🎯
Focusing

Slav Basharov basharovV

🎯
Focusing
View GitHub Profile
@basharovV
basharovV / set_firebase_config.js
Last active April 25, 2023 22:36
Deploy Firebase Environment config from JSON file
/**
* Deploy Firebase Environment Variables config from a JSON file
*
* Before using this script, make sure that you've set the right Firebase project to deploy to
* firebase use <alias>
*
* Example usage: node set_firebase_config.js exampleConfig.json
*/
var fs = require('fs');
var util = require('util');
@basharovV
basharovV / https_nginx_express_node_config.md
Last active October 31, 2023 15:11
How to configure HTTPS with Lets Encrypt, Nginx reverse proxy, Express and Node

How to configure HTTPS with Lets Encrypt, Nginx reverse proxy, Express and Node

  1. Have a Node app ready for production.
  2. Create an app.js file in your project directory:
const express = require('express');
const path = require('path');
const app = express();

// Allow dotfiles - this is required for verification by Lets Encrypt's certbot