Skip to content

javiercejudo/heroku-static-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Heroku static setup

This repository has the basic setup for deploying static sites to Heroku using Dropbox.

See demo at https://github.com/javiercejudo/heroku-static-setup-demo.

Basic usage

Requirements:

  • Your static site.
  • A Heroku account.
  • A Dropbox account with the app installed on your system.

To deploy your static site:

  • Login to Heroku and create a new app.
  • Connect the app to Dropbox. This will create a new folder under Dropbox/Apps/Heroku/ with the name of your app. Learn more.
  • Copy your static site inside a folder named public/ into the app's folder.
  • Download the latest version of the heroku-static-setup and extract the files into the app's folder. At this point, you should have the following:
Dropbox/
`-- Apps/
    `-- Heroku/
        `-- app-name/
            |-- public/
            |   |-- [Your static files]
            |   `-- ...
            |-- package.json
            |-- index.js
            `-- Procfile
  • Wait until Dropbox has synchronised all the files and deploy from the Heroku interface.
  • When the build is finished, you should be able to see your site at https://[app-name].herokuapp.com.

Features

  • Simple workflow without Git, the Heroku Toolbet or even the command line.
  • Gzip compression out of the box.

Contents

  • package.json: defines the NPM dependencies.
  • index.js: defines the app, the path to your static site (public/ by default) and the port (5000 by default).
  • Procfile: tells Heroku how to start the server.

Local testing

To start the app on a different port, run PORT=[your port] npm start.

About

A skeleton for deploying static sites to Heroku

Resources

License

Stars

Watchers

Forks

Packages

No packages published