tsed-getting-started
tsed-getting-started copied to clipboard
How to change the /rest prefix?
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?
for me also happens the same
Can you send me tour server config please :)
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
})
Ho yes isn't configurable... I fix that ASAP
@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: https://github.com/TypedProject/tsed-getting-started/commit/31fcca434a78c64ee8458ae35f33878ee3bd848a
See you Romain