Skip to content

Commit f01bede

Browse files
authored
chore(example-apps): added nextjs example app (#2125)
1 parent e570ebe commit f01bede

File tree

6 files changed

+1940
-0
lines changed

6 files changed

+1940
-0
lines changed

example-apps/nextjs-app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.next

example-apps/nextjs-app/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Instana Next.js Example
2+
3+
A simple Next.js app integrated with Instana.
4+
5+
## Setup
6+
7+
ESM loader is configured in `package.json`:
8+
9+
```json
10+
"start": "NODE_OPTIONS='--import ./node_modules/@instana/collector/esm-register.mjs' INSTANA_DEBUG=true next start"
11+
```
12+
13+
## Run the App
14+
15+
```bash
16+
npm i
17+
npm run build
18+
npm run start
19+
```
20+
21+
App runs at `http://localhost:3000`.
22+
23+
## Routes
24+
25+
* **Home:** `/` – Basic landing page
26+
* **API:** `/api/hello` – Returns `{ "message": "Hello from Instana-monitored Next.js API!" }`

0 commit comments

Comments
 (0)