#!/bin/sh # nginx-here [DIR] [PORT] - serve current directory (or DIR) on PORT (or 8080) DIR=$(realpath ${1:-.}) PORT=${2:-8080} mkdir -p /tmp/.nginx-here.$$ cat >/tmp/.nginx-here.$$/cfg <