GitXplorerGitXplorer
d

funnel-demo

public
0 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
66ead5ed127609f2502223287635f60530950ed1

documentation

ddanielkhan committed 10 months ago
Unverified
cc63eb78d9149eab7b716ee9786018f4c6e5ba0c

gitignore remove pycache

ddanielkhan committed 10 months ago
Unverified
a5f9fbeaee8c1c1263f5e271ef39673c976e247f

update .env sample

ddanielkhan committed 10 months ago
Unverified
431696896c688009b40a45fab09742ccd0324ce8

Update app structure

ddanielkhan committed 10 months ago
Unverified
cb7a4b30ae4cd8258f625410496801f27a297100

Initialize project using Create React App

ddanielkhan committed a year ago

README

The README file for this repository.

React Funnel Sample Application

This repository contains a sample application consisting of a React frontend and Flask backend. The Flask backend simulates a call to an API (using httbin in a Docker container) and there are ways to emulate different response codes or delays. The app reports Sentry Errors, Traces and Metrics.

Setup

  1. Download and install Python >= 3 if you haven't already.
  2. Download and install a recent Node.js version if you haven't already.
  3. Download and install Docker Desktop if you haven't already.
  4. Clone the repository and open it in Visual Studio Code.
  5. Install the Python Language Support extension in Visual Studio Code.
  6. Go to "View -> Command Palette" ans search for "Python: Create Environment".
  7. Select ".venv" and follow the instructions
  • select a Python interpreter from the list
  • confirm to let all extensions to be installed.
  1. Rename .env-sample to .env.
  2. Create a Sentry project for React and for Flask and enter their DSNs into their respective properties in .env.
  3. Open a separate terminal run
  • cd backend
  • pip install -r ./requirements.txt
  1. Open a terminal in Visual Studio Code and run
  • cd frontend
  • npm install
  • npm start
  1. In another separate terminal, type ./start-third-party.sh.

This should open the browser at http://127.0.0.1:3000.

Emulating Problems

Open backend/app.py - at around line 30 you find the call to the third party service. The inline comments contain examples how to simulate different problems, like delays or an error 500.