README.md 1.1 KB
Newer Older
1 2 3 4 5 6
[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-sentry)

# Sentry example

## How to use

7 8
### Using `create-next-app`

9
Execute [`create-next-app`](https://github.com/segmentio/create-next-app) with [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) or [npx](https://github.com/zkat/npx#readme) to bootstrap the example:
10

11 12 13 14
```bash
npx create-next-app --example with-sentry with-sentry-app
# or
yarn create next-app --example with-sentry with-sentry-app
15 16 17 18
```

### Download manually

19 20 21 22 23 24 25 26
Download the example [or clone the repo](https://github.com/zeit/next.js):

Install it and run:

**npm**
```bash
npm install
npm run dev
27 28 29
# or
yarn
yarn dev
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
```

**yarn**
```bash
npm install
npm run dev
```

Deploy it to the cloud with [now](https://zeit.co/now) ([download](https://zeit.co/download))

```bash
now
```

## About example

This example show you how to add Sentry to catch errors in next.js

You will need a Sentry DSN for your project. You can get it from the Settings of your Project, in **Client Keys (DSN)**, and copy the string labeled **DSN (Public)**.