Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change the /rest prefix? #2

Open
DonsWayo opened this issue Oct 21, 2019 · 5 comments
Open

How to change the /rest prefix? #2

DonsWayo opened this issue Oct 21, 2019 · 5 comments

Comments

@DonsWayo
Copy link

I try to change the /rest in the routing, on swagger is show this prefix. I try to restart several times but I think is not rebuild the swagger docs. Any tip?

@rrdlpl
Copy link

rrdlpl commented Oct 23, 2019

for me also happens the same

@Romakita
Copy link
Collaborator

Can you send me tour server config please :)

@rrdlpl
Copy link

rrdlpl commented Oct 23, 2019

Hi @DonsWayo I checked out the documentation and in your Server class you can add to the @ServerSettings decorator the mount option. Checkout mine as an example:

@ServerSettings({
  rootDir,
  acceptMimes: ["application/json"],
  httpPort: 5000,
  mount: {
    "/": "${rootDir}/controllers/**/*.ts",
  },
  logger: {
    debug: true,
    logRequest: true,
    requestFields: ["reqId", "method", "url", "headers", "query", "params", "duration"]
  },
  swagger: {
    path: "/docs"
  },
  calendar: {
    token: true
  },
  debug: true
})

@Romakita
Copy link
Collaborator

Ho yes isn't configurable... I fix that ASAP

@Romakita
Copy link
Collaborator

@DonsWayo @rrdlpl,

Ho ok is see where come from the mistake. Did you seen you have a RestCtrl in the getting-started example ? You have to remove it also, because the controller is loaded automatically by tsed according to your configure :)
I added a branch with the some change to help you: 31fcca4

See you
Romain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants