-
-
Notifications
You must be signed in to change notification settings - Fork 793
Closed
Description
I could achieve this on FeathersJS v4 using this code:
const { Test } = require('./test.class');
app.use(
'/test',
(req, res, next) => {
res.data = 'Step 1 worked'
next()
},
new Test(options, app), // THIS JUST WORKS
(req, res) => {
res.json({
message: Hello world from Express middleware ${res.data}
})
},
)
Now I have no idea how to achieve the same on FeathersJS V5
import { TestService, getOptions } from './test.class'
import { appUploadsPath, appUploadsMethods } from './app-uploads.shared'
app.use(
testPath,
(req, res, next) => {
res.data = 'Step 1 worked'
next()
},
new TestService(getOptions(app)), // THIS IS NOT WORKING AT ALL
(req, res) => {
res.json({
message: Hello world from Express middleware ${res.data}
})
},
)
Thanks for your help.
Metadata
Metadata
Assignees
Labels
No labels