How to use pull request previews for Node.js websites in Hostinger

Get a temporary preview link for every GitHub pull request on your Node.js website.

Updated 6 days ago

Node.js pull request previews in Hostinger give you a temporary link to test each pull request before you merge it. When you open a pull request in the GitHub repository connected to your Node.js website, Hostinger builds that version separately from your live website. Hostinger then posts the preview link as a comment in the pull request. You can also track each preview’s build status, preview link, and deployment logs on the Deployments page in Hostinger dashboard. The preview and its link are removed when the pull request is merged or closed.

Before you start

  • Your Node.js website must be deployed from a GitHub repository. Pull request previews don’t apply to websites deployed by uploading files.

How pull request previews work for Node.js websites

Hostinger creates a pull request preview automatically, with no setup needed in your repository:

  1. Open a pull request in the GitHub repository connected to your Node.js website.
  2. Hostinger builds that version of your website in a separate folder next to your live website. Your live website is not changed.
  3. When the build is ready, the hostinger bot comments on the pull request with the commit the preview was built from and a temporary hostingersite.com link.
  4. Open the link to review your changes before you merge.

The pull request preview and its link are removed when the pull request is merged or closed.

Check pull request previews in Hostinger dashboard

Hostinger dashboard lists every open pull request preview for your Node.js website on the Open pull requests tab of the Deployments page.

  1. In Hostinger dashboard, go to Websites and open your Node.js website.
  2. Select Deployments from the sidebar menu.
  3. Open the Open pull requests tab.

Each pull request in the list shows its title and branch, author, live commit, build status, preview link, and last update time. From the list, you can:

  • Click the pull request title to open the pull request on GitHub.
  • Click the preview link to open the preview of your website.
  • Click View logs to check the deployment logs and see whether the pull request built successfully.

A pull request leaves the Open pull requests list once it is merged or closed.

With pull request previews, you can check every change on a working copy of your Node.js website while your live website stays untouched.

Learn more about connecting a repository in How to add a Node.js web app in Hostinger.