Skip to content

Commit 0496d04

Browse files
authored
Merge pull request #59 from StrontiumJS/develop
RC 2.6.0
2 parents b313dec + 8a2ed67 commit 0496d04

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "strontium",
3-
"version": "2.5.2",
3+
"version": "2.6.0",
44
"description": "Strontium is a TypeScript toolkit for High Performance API servers built for Production not Projects.",
55
"main": "lib/src/index.js",
66
"types": "lib/src/index.d.ts",

src/http/drivers/FastifyServer.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ export class FastifyServer implements Process {
104104
// Attach the container to the server
105105
this.server.decorateRequest("container", container)
106106

107+
let plugins = this.getPlugins(container)
108+
for (let p of plugins) {
109+
this.server.register(p)
110+
}
111+
107112
let middleware = this.getMiddleware(container)
108113
for (let m of middleware) {
109114
this.server.use(m)
@@ -129,6 +134,12 @@ export class FastifyServer implements Process {
129134
return []
130135
}
131136

137+
protected getPlugins(
138+
container: Container
139+
): Array<Fastify.Plugin<any, any, any, any>> {
140+
return []
141+
}
142+
132143
protected getRequestMetadata = (
133144
request: Fastify.FastifyRequest<any, any, any, any, any>
134145
): { [key: string]: any } => ({})

0 commit comments

Comments
 (0)