Just a quick check you can do on your axios request :
When creating an api with NestJS it come with the globalPrefix variable like this :
app.setGlobalPrefix(globalPrefix); // <= This variable
const port = process.env.NX_RC_PUBLIC_API;
const hostname = '0.0.0.0';
await app.listen(port, hostname);
Logger.log(
`🚀 Application is running on: http://${hostname}:${port}/${globalPrefix} | Version : ${process.env.VERSION}`
);
Did you check you don't forget to add this to your request ?
When generating with NX for exemple the most common is "api" so you request should look like :
const response = await axios.post('http://localhost:3000/api/naptime/create', createNapTimeDto);