Skip to content

Instantly share code, notes, and snippets.

@ziedmahdi
ziedmahdi / .eslint
Created January 5, 2020 09:43
get started with eslint in node env
{
"env": {
"node": 1,
"browser": 1
},
"extends": "eslint:recommended",
"globals": {},
"rules": {
"indent": [
"error",
@ziedmahdi
ziedmahdi / setup.sh
Last active January 11, 2020 09:21
Get started with Node
npx create-react-app mflix
//create backend for api server code
mkdir backend
cd backend
//init a new node project
npm init -y
npm install nodemon @babel/core @babel/node @babel/preset-env eslint --save-dev
@ziedmahdi
ziedmahdi / nginx.conf
Created July 22, 2017 12:54 — forked from LarsBuur/nginx.conf
meteor nginx load balance with sticky session, used by vida.io
# Sticky session module for nginx
# https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/
# nginx configure command: ./configure --with-http_ssl_module --add-module=../nginx-sticky-module-ng/ --sbin-path=/usr/local/sbin --with-http_gzip_static_module
upstream vida_node_server {
sticky path=/;
server 127.0.0.1:3000 max_fails=3 fail_timeout=30s;
server [server2]:3000 max_fails=3 fail_timeout=30s;
}