Skip to content
Branch: master
Find file History

Latest commit

Latest commit b23f2d6 Dec 3, 2019


Type Name Latest commit message Commit time
Failed to load latest commit information. docs: add heroku server guide Dec 3, 2019
package.json docs: add heroku server guide Dec 3, 2019
server.js docs: add heroku server guide Dec 3, 2019

Heroku-based LHCI Server


The LHCI server can be run in any node environment with persistent disk storage or network access to a postgres database. Heroku offers a free tier of hosting that provides exactly this!

Setting Up Your Repo

# Create a directory and repo for your heroku project
mkdir lhci-heroku && cd lhci-heroku && git init
# Setup the LHCI files
curl > package.json
curl > server.js
# Create the project's first commit
git add -A && git commit -m 'Initial commit'

Setting Up Heroku

This assumes you've already signed up, created a heroku account, and installed the heroku CLI.

# Create a new project on heroku
heroku create
# Add a free database to your project
heroku addons:create heroku-postgresql:hobby-dev
# Deploy your code to heroku
git push heroku master
# Ensure heroku is running your app and open the URL
heroku ps:scale web=1
heroku open

Updating LHCI

Updates are made to the LHCI server from time to time and you'll want to keep up! You can update your LHCI server on Heroku just by pushing a commit.

# Update LHCI
npm install --save @lhci/server@latest
# Create a commit with your update
git add -A && git commit -m 'update LHCI'
# Deploy your update to heroku
git push heroku master
You can’t perform that action at this time.