I come to you because I have followed the guide On NestJS to perform the implementation in my project with Nestjs.
However, what seems to be an almost completed configuration, I am running into the problem of the post to the authentication path that forest admin makes to /forest/authentication to my API.
At first, I was dealing with this quite a bit until I decided to create this path in my project (I created the route, and controller that receives this request); however, now I don’t know which thread to pull, since forest admin already finds the path, but I still don’t know what to do with the process of the request being made to this path.
I would like to please get a hand.
Failure Logs
Application is running on: http://[::1]:3000
{ body: { renderingId: '240889' } }
Hi and welcome to forest,
You don’t need to add a new route on your project for the authentication. It’s already implement on our agent.
The line 54 is listening the server before to start the agent. It’s probably your problem. Please can you move the line 54 after the start ?
Please can you add a customization that update the forestadmin-schema to try to unlock the build? For example, addField?
I thought this was done automatically, that is, when creating the agent and connecting it to the database, the configuration of the collections would be created automatically
Yes it is, but I don’t know why but your build seems broken. The addField allows you to add a “computed field”/ “virtual field” like the full name in the example. I want to force the rebuild, by changing something from your side.
How do you push your code in production?
In production mode you must have the .forestadmin-schema.json in your source due to performance reasons! In development mode the schema is built at each agent start. By default the schema is generated in your root. If you want to customize the path you should path the schemaPath option to your agent.
Your have this error because you probably don’t have the .forestadmin-schema.json.