Node.js Express Deployment on Vercel: Quick and Easy

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this tutorial we will learn how to deploy a node.js express application for free on versal to get started we need to create a hobby account on versal and connect it to the git provider where our application is stored we can connect to any git provider where our application is hosted but for this tutorial we will connect to GitHub once connected all our repositories will be displayed and we can push all our code to our git repository before importing our Repository this is a simple node.js express application that we have created in the previous tutorials before deploying our application we need to add a configuration file in our repository to tell Vel which type of application we are deploying for this we need to add a file called versal do Json in the root directory of our application and add the following content the config version we are using is two and we need to define the source entry file and the type of build we are using for us it's node finally we must indicate the roots this will ensure that all incoming traffic is directed to the correct folder since our server starting file is located in the root of the application we specify that all traffic should be redirected there now we can import our code and do a deployment we can give any name we want and since we are deploying a node.js application we have to select other framework versal will detect the framework using our versal config if our server starting file is nested inside any folder we can change our root directory to that path in our case it's on the root so we can leave it default if we have any specific build commands we can Define them here in our case we don't need any builds versal will try automatically following commands to install the code if we have any specific command while installing we can Define it here finally we can add all our environment variables of our application we can simply copy and paste them here after updating our environment to prod we can deploy our application by clicking on the deploy button our application will be deployed and we can access it by clicking on the visit button in order to test the functionality of nested Roots we can add a testing rout that simply returns a string to check if our Firebase connection is proper we can add a new route that pulls the transactions from our Firebase fire store this route will take two query parameters one is from date and the other one is to date then we will get the data from fire base using the method that we created in the previous tutorial by passing our from and to dates and we will simply return that data it's important to note that the date format is mmdd y y y y awesome now let's push our changes and versal should automatically do a new deployment for us finally we need to update our telegram bot hook to use this endpoint we can update it using Postman and test our telegram bot to see if everything is working properly awesome we deployed our noj's application successfully if you have any questions or concerns please don't hesitate to ask wishing you a wonderful day ahead
Info
Channel: Lets build together
Views: 8,939
Rating: undefined out of 5
Keywords: Vercel, Node.js, Express, Deployment, Web Development, GitHub, Vercel Deployment, Tutorial, Free Hosting, Node.js Express, Web Development Tutorial, Coding, Programming, Git, Firebase, Telegram Bot, Vercel Hosting, Step-by-Step, Configuration, Node.js Deployment, Software Development, Vercel Tutorial
Id: IeM1PGqmJT4
Channel Id: undefined
Length: 4min 48sec (288 seconds)
Published: Sun Oct 15 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.