Skip to content

Commit 6c147c4

Browse files
committed
Fix casing of internalServerErrorCode in app configuration
1 parent 4711b7b commit 6c147c4

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ app:
167167
disableLogRequestBody: false
168168
disableSendRequestIdHeader: false
169169
disableApiErrorHandler: false
170-
InternalServerErrorCode: 200
170+
internalServerErrorCode: 200
171171
disableHealthCheckRoutes: false
172172
healthCheckRoutesPrefix: "/health-check"
173173
enableHealthCheckShowsGitRev: false
@@ -233,5 +233,5 @@ You can also create subfolders in the `app` folder to organize your API. If you
233233

234234
## Start the server
235235
```javascript
236-
require('@jestery/fastify-app')(require('js-yaml').load(require('fs').readFileSync('./config.yaml', 'utf8')))
236+
require('fastify-app')(require('js-yaml').load(require('fs').readFileSync('./config.yaml', 'utf8')))
237237
```

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ module.exports = (
124124
err.statusCode = error.statusCode
125125
err.code = error.code
126126
}
127-
res.status(config.app.InternalServerErrorCode || 200).send(err)
127+
res.status(config.app.internalServerErrorCode || 200).send(err)
128128
}
129129
})
130130
if (!config.app.disableLogApiError) {

package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "fastify-app",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "A simple fastify app template for JSON API server with helpful routes and initial settings.",
55
"main": "index.js",
66
"scripts": {
@@ -14,8 +14,8 @@
1414
"author": "Zhiyi",
1515
"license": "ISC",
1616
"dependencies": {
17-
"fastify": "^4.22.2",
18-
"@fastify/cors": "^8.3.0",
17+
"fastify": "^4.26.2",
18+
"@fastify/cors": "^9.0.1",
1919
"fast-glob": "^3.3.2"
2020
}
2121
}

0 commit comments

Comments
 (0)