Skip to content
This repository was archived by the owner on Jun 22, 2025. It is now read-only.
This repository was archived by the owner on Jun 22, 2025. It is now read-only.

root service is for /api, not / #12

@mariusa

Description

@mariusa

To Reproduce

http://localhost:5000/api gives

{"message":"Hello Fastify!"}

Expected behavior

http://localhost:5000/ to work instead
A clear and concise description of what you expected to happen.

Cause:

 fastify.register(AutoLoad, {
        dir: path.join(__dirname, 'services'),
        options: Object.assign({ prefix: '/api' }, opts)
    })

Please make root handle '/', so I can see an example of routes with prefix, other routes with some other prefix, and routes with no prefix.

Thanks!

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