Skip to content

tsukurite/fake-dev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 

Repository files navigation

fake-dev

fake development environment with nginx

requirements

install from Homebrew:

"homebrew/nginx" formulae renamed to "denji/homebrew"

$ brew tap denji/nginx
$ brew install nginx-full --with-subs-filter-module

If you get an error "Error: Formulae found in multiple taps:"

$ brew untap homebrew/nginx
$ brew tap denji/nginx
$ brew install nginx-full  --with-subs-filter-module

download config file:

$ curl -L https://raw.githubusercontent.com/tsukurite/fake-dev/master/fake-dev.conf -o ~/.fake-dev.conf

how to use

execute in webroot directory's hierarchy. execute below:

$ cd /path/to/app
$ nginx -p . -c ~/.fake-dev.conf

press Ctrl-c to exit.

tips

easily execute with fake-dev alias:

$ echo 'alias fake-dev="nginx -p . -c ~/.fake-dev.conf"' >> ~/.bashrc
$ cd /path/to/app
$ fake-dev

Start server with a specific port:

cat << EOS >> ~/.bashrc
function fake-dev-port () {
  sed -e "s/127.0.0.1:8080/127.0.0.1:\$1/g" ~/.fake-dev.conf > ~/.fake-dev.temp.conf
  nginx -p . -c ~/.fake-dev.temp.conf
}
EOS

License

The MIT license. Please see top of fake-dev.conf.

About

fake development environment with nginx

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published