Skip to content

Commit 070847e

Browse files
authored
docs(readme): replace use of deprecated variadic listen() (#217)
1 parent 1848dfe commit 070847e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ fastify.register(async function (fastify) {
4141
})
4242
})
4343

44-
fastify.listen(3000, err => {
44+
fastify.listen({ port: 3000 }, err => {
4545
if (err) {
4646
fastify.log.error(err)
4747
process.exit(1)
@@ -78,7 +78,7 @@ fastify.register(async function (fastify) {
7878
})
7979
})
8080

81-
fastify.listen(3000, err => {
81+
fastify.listen({ port: 3000 }, err => {
8282
if (err) {
8383
fastify.log.error(err)
8484
process.exit(1)
@@ -182,7 +182,7 @@ fastify.register(async function () {
182182
})
183183
})
184184

185-
fastify.listen(3000, err => {
185+
fastify.listen({ port: 3000 }, err => {
186186
if (err) {
187187
fastify.log.error(err)
188188
process.exit(1)
@@ -223,7 +223,7 @@ fastify.get('/', { websocket: true }, (connection /* SocketStream */, req /* Fas
223223
})
224224
})
225225

226-
fastify.listen(3000, err => {
226+
fastify.listen({ port: 3000 }, err => {
227227
if (err) {
228228
fastify.log.error(err)
229229
process.exit(1)

0 commit comments

Comments
 (0)