This repo contains the source code for the Student Management System website for the article: A/B Testing in Nest.js with ConfigCat and Amplitude. Read the blog post here.
The website was built with Nest.js in the backend, and React.js in the frontend. The A/B test compares two variations of the newsletter's heading on the homepage of the website.
Newsletter: A version(Control)
Newsletter: B version(Variant)
Follow these steps to clone this repository on your computer:
- Click on the green "Code" button in the repository's page and copy the URL in the text field that pops up.
- Open up your command line application.
- Paste and run the command:
git clone https://github.com/configcat-labs/ab-testing-nestJS-sample.git
. - Navigate to the newly created folder: "ab-testing-nestJS-sample".
- Install the dependencies.
npm install
Once you're in the folder, you'll have to run the Nest.js backend and then the React.js frontend.
To run the backend:
Run npm run start
, or npm run start:dev
to enable automatic reloading.
To run the frontend, exeute these commands:
cd frontend
- Install the dependencies.
npm install
npm run start
Info: You can find the code for the newsletter in the App.js
file in the frontend folder.
Useful links to technical resources.
- Nest.js Docs
- ConfigCat Percentage-based Targeting Docs
- Amplitude Node SDK
- Amplitude Event Segmentation Charts
- A/B Testing with Feature Flags
- Feature Flags in Nest.js
ConfigCat also supports many other frameworks and languages. Check out the full list of supported SDKs here.
You can also explore other code samples for various languages, frameworks, and topics here in the ConfigCat labs on GitHub.
Keep up with ConfigCat on Twitter, Facebook, LinkedIn, and GitHub.
Contributions are welcome!