After research how to deploy Express.js app to Vercel. Finally, I found and got have an application has deployed to Vercel. It's take a lot of time from me but I am happy and hope this article will help something to you.
I. First of all, creating new Github repository and init new project nodejs.
II. Creating new project in Vercel
III. Installing package express to nodejs app.
IV. Creating and endpoint file index.js in root source.
V. Creating APIs in ./api folder or you can rename anything which you like.
- Here is an example for manage product from
./api/product.
VI. Testing before commit source to Github.
- After testing is 👌. Commit them to git to see something awesome.
VII. Ready to serve in Vercel.
VIII. Something went wrong in Vercel.
- Because Vercel just supports API from Framework JS as NEXT.JS, Nuxt.JS,... So if we develop a standalone application we need to configure or tell the server of Vercel how is it work by vercel.json file.
IX. Add new vercel.json file to root source.
- Commit it to GitHub and make sure
versionis2- this is required from Vercel.
X. Done, enjoy your moment.
Thanks for reading.
And I hope something good to you.
Here is repository which use in this post.
XI. Or you can follow this tutorial in youtube.










Latest comments (25)
Your app doesn't work express-vercel-theta.vercel.app
Cannot GET /
Thanks man. I was stuck in last step and this helped me a lot.
But how can I deploy a express - handlebars to vercel ? Here is my folder structure and vercel.json :
have you got any answer?
Hi ! I am having an issue, I can see my express app (which has front too) in localhost successfully, but when i deploy it in vercel, I cannot see the app, what should i do?}
ThankS!
this is awsome ,hey can i use mongodb data base for this as well
I'm working on a next.js app which uses mongod and host my backend on MongoDB Atlas. Yes, you can use MongoDB. And better yet would be to use Mongoose because of its schemas.
Thanks!
So i created an api with express
can i use vercel to deploy it?
Yes, you can.
Could you show us how to do this with Angular Universal or NestJS?
I will try it.
Thanks!