Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 1.35 KB

File metadata and controls

45 lines (31 loc) · 1.35 KB

React

This is an example project showing how to use @bugsnag/js with a React project.

This project was bootstrapped with create-react-app.

Usage

Clone the repo and cd into the directory of this example:

git clone git@github.com:bugsnag/bugsnag-js.git
cd bugsnag-js/examples/js/react

Take a look at…

With docker

The project includes a Dockerfile. If you're familiar with docker, this is the easiest way to start the example. Otherwise, skip ahead to the without docker section.

docker build -t bugsnag-js-example-react . && \
docker run -p 5000:5000 -it bugsnag-js-example-react

Note: remember to replace YOUR_API_KEY in src/lib/bugsnag.js with your own!

Without docker

To create an optimized production build, ensure you have a version of Node.js >=4 on your machine:

npm install
npm run serve

or alternatively, to run a development server that automatically reloads the page when you make changes to the code:

npm install
npm start

Note: remember to replace YOUR_API_KEY in src/index.js with your own!