8000 `app` property missing on setup hook · Issue #2717 · feathersjs/feathers · GitHub
[go: up one dir, main page]

Skip to content

app property missing on setup hook #2717

@Catatomik

Description

@Catatomik

Steps to reproduce

  • app property is missing from the HookContext of any application setup hook.

Example :

import { MongoClient } from 'mongodb'

app.hooks({
  setup: [
    async (context: HookContext, next: NextFunction) => {
      const mongodb = new MongoClient(yourConnectionURI)

      await mongodb.connect()
      context.app.set('mongodb', mongodb)
      await next()
    }
  ]
})

Taken directly from featherjs's Dove docs.
context.app is undefined here.

Expected behavior

There should be an app property on setup's HookContext.

Actual behavior

There is no app property on setup's HookContext.

System configuration

Module versions (especially the part that's not working): every @feathersjs libs version 5.0.0-pre.28

NodeJS version: 17.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0