Skip to content

Commit 2c00ab7

Browse files
authored
chore: Updated simple express to have a start script and rely on .env for license key (#299)
1 parent 3755c57 commit 2c00ab7

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Diff for: simple-express-app/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ This example application uses [express](https://github.com/expressjs/express) an
55
## Setup
66

77
1. Run `npm install`
8-
1. Start application with `NEW_RELIC_LICENSE_KEY=<your-key> node index.js`
9-
8+
1. `cp env.sample .env` fill out `NEW_RELIC_LICENSE_KEY`.
9+
1. `npm start`
1010

1111
## Test
1212

Diff for: simple-express-app/env.sample

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
NEW_RELIC_LICENSE_KEY=

Diff for: simple-express-app/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"test": "echo \"Error: no test specified\" && exit 1",
8+
"start": "node -r newrelic --env-file .env index.js"
89
},
910
"author": "",
1011
"license": "ISC",
@@ -13,6 +14,6 @@
1314
"bluebird": "^3.7.2",
1415
"body-parser": "^1.20.2",
1516
"express": "^4.18.2",
16-
"newrelic": "^11.10.2"
17+
"newrelic": "^12.5.0"
1718
}
1819
}

0 commit comments

Comments
 (0)