A simple proxy server to handle Now.sh deployments AB tests
Clone or download
Latest commit 59c7183 Jun 1, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Proxy AB server Sep 16, 2017
LICENSE Initial commit Sep 16, 2017
README.md Fix description Sep 16, 2017
index.js Update index.js Jun 1, 2018
package.json Update dependency now-env to v3 Jun 1, 2018
renovate.json Add renovate.json Jun 1, 2018
yarn.lock Update dependency now-env to v3 Jun 1, 2018

README.md

now-ab

This a simple HTTP proxy server to handle Now.sh deployments AB tests.

Usage

Deploy it with

now sergiodxa/now-ab

Now will prompt you to define 2 environment variables TEST_A and TEST_B with urls (including the protocol).

When an user access this server is going to proxy the request to one of those (doing a simple random to define which one) and will set a cookie called now_ab with the user test case (TEST_A or TEST_B).

You can also add more test variables to support more test cases just adding -e TEST_C=$URL when deploying, the server will use any variable starting with TEST_ to get possible test cases.