Use TDD to build your NginX config files feature by feature, or write regression tests to help you refactor your config-monsters.
You'll need Ruby and bundler.
Add this line to a Gemfile in your project folder:
gem 'rspec-nginx'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rspec-nginx
require 'rspec/nginx'
describe 'simple-vhost-with-www-redirect' do
describe 'nginx.conf', :type => :nginx_config do
it { should have_valid_syntax }
end
end
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request