Skip to content

feature: enable plugins / custom middleware #1

@anoack93

Description

@anoack93

As a developer I want to customize api responses or add project specific logic by adding a plugin.

Suggestion:

First enable a configuration file .servemocks.config.js which will be loaded by servemocks,
This could look like this:

import customMiddleware from './foo/bar/custom-middleware'

export default {
  middleware: [
    {
      name: 'custom-middleware',
      handler: customMiddleware
    }
  ]
}

Servemocks now will be able to execute customMiddleware at some point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions