# Deploy Node.js application to Vercel in 5 minutes

## Introduction

Deploying a Node.js application to Vercel can be easily done by just adding a vercel.json configuration file to your project root directory.

Here I will show you how it can be achieved.

## Add vercel.json file

First of all, add a vercel.json file in the root directory of your existing Node.js project.  Add and commit the file to the Git repository.

```json
{
   "version": 2,
   "name": "music-album",
   "builds": [
      { "src": "app.js", "use": "@vercel/node" }
   ],
   "routes": [
      { "src": "/(.*)", "dest": "/app.js" }
   ]
}
```

## Create a Vercel project

1. Login [Vercel](https://vercel.com/).

    If you don't have an account yet, you can [sign up](https://vercel.com/signup) for a free account.

2. Click the "+ New Project" button on the Overview tab.

    ![New Project](https://cdn.hashnode.com/res/hashnode/image/upload/v1646499471208/m0PrfKgzn.png)

3. Import Git Repository by selecting the Git provider. GitHub, GitLab and Bitbucket are available.

    ![Import GIt Repo](https://cdn.hashnode.com/res/hashnode/image/upload/v1646499512948/T103oEwOl.png)

4. Import Git Repository.

    ![Import GIt Repo](https://cdn.hashnode.com/res/hashnode/image/upload/v1646499530462/eyo2LkAKh.png)

5. Configure the project.
    1. Give a Project Name.
    2. Click the "Deploy" button.
    The deployment should be triggered.

    ![Configure Project](https://cdn.hashnode.com/res/hashnode/image/upload/v1646499546304/21nMOIpV1.png)

6. Check the deployment status.

    ![Check deployment](https://cdn.hashnode.com/res/hashnode/image/upload/v1646499563984/ko1TWDank.png)

7. Click the link under DOMAINS to view the application in browser.

    ![View deployment](https://cdn.hashnode.com/res/hashnode/image/upload/v1646499583419/UofTiiObo.png)

## Conclusion

Congratulations!  Your Node.js application is now configured to be deployed to Vercel easily by adding a configuration file to the project.

## References
1. [Source code in GitHub](https://github.com/adafycheng/music-album)
2. [Live demo at Vercel](https://music-album-liart.vercel.app)

