Getting started Static site with Heroku

Agenda

  1. Step 1: Creat a Heroku Apps from the CLI
  2. Step 2: Connect to Heroku
  3. Step 3: Add static pages
  4. Step 4: Deploy

Step 1: Create a Heroku project

1
2
3
4
mkdir hoehoe123
cd hoehoe123
git init
heroku apps:create hoehoe123

Step 2: Connect to Heroku

1
heroku git:remote -a hoehoe123

Step 3: Add static pages

Add index.php

1
<?php header( 'Location: /index.html' ) ;  ?>

Add index.html

1
2
3
4
5
6
7
8
9
10
11
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
hoe
</body>
</html>

Step 4: Deploy

1
2
3
git add.
git commit -m "Initial"
git push heroku master

Open: https://hoehoe123.herokuapp.com
Check your project: https://dashboard.heroku.com/apps/hoehoe123

Heroku