Skip to content

Commit 711a8b8

Browse files
authored
fix(express-example): minor tweaks after #3205 (#3207)
1 parent d3c7739 commit 711a8b8

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

examples/express/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"tracing"
2020
],
2121
"engines": {
22-
"node": ">=14"
22+
"node": "^18.19.0 || >=20.6.0"
2323
},
2424
"author": "OpenTelemetry Authors",
2525
"license": "Apache-2.0",

examples/express/src/server.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,17 @@ setupTracing('example-express-server');
2323
import * as express from 'express';
2424
import * as axios from 'axios';
2525
import { RequestHandler } from 'express';
26-
import type { Resource } from '@opentelemetry/resources';
2726

2827
// Setup express
2928
const app = express();
3029
const PORT = 8080;
3130

3231
const getCrudController = () => {
3332
const router = express.Router();
34-
const resources: Resource[] = [];
35-
router.get('/', (req, res) => res.send(resources));
33+
const things: unknown[] = [];
34+
router.get('/', (req, res) => res.send(things));
3635
router.post('/', (req, res) => {
37-
resources.push(req.body);
36+
things.push(req.body);
3837
return res.status(201).send(req.body);
3938
});
4039
return router;

0 commit comments

Comments
 (0)