Skip to content

Instantly share code, notes, and snippets.

View yanai101's full-sized avatar
🤩

yanai yanai101

🤩
  • israel
View GitHub Profile
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active October 24, 2025 01:17
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

@yanai101
yanai101 / api.js
Last active December 2, 2018 09:03
express sse example
/// server ///
var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
res.status(200).set({
'Content-Type': 'text/event-stream',
'Cache-Control': 'no-cache',
@vedranjaic
vedranjaic / _mixins.scss
Last active January 12, 2017 07:37
sass breakpoint mixin for media queries
// Mixins
// http://css-tricks.com/media-queries-sass-3-2-and-codekit/
@mixin breakpoint($point) {
@if $point == lg {
@media (min-width: 1200px) { @content; }
}
@else if $point == md {
@media (min-width: 992px) { @content; }
}
@else if $point == sm {