Relative Content

Tag Archive for javascriptnext.jsaxiosvercel

Nextjs API works in local environment but not in production

I have created a blog project using Next. When posting a new article, the API route is called with axios and the article is created in my database (MongoDB).
Everything works fine in local environement but I’ve been unable to make it work once deployed on Vercel.
I’m pretty sure it has to do with my environement variables but I’m stuck on this.