Heroku: Hello World in PHP using Toolbelt

This post describes how to deploy a sample PHP application on Heroku using the CLI tool.


what is Heroku

"Heroku is a platform as a service (PaaS) that enables developers to build, run, and operate applications entirely in the cloud" (https://www.heroku.com/)


register account

1. https://www.heroku.com/ > sign up > ... > create free account

2. [your email] > click activation link > set password

3. https://dashboard.heroku.com/ > accept terms & conditions


setup Toolbelt (CLI tool for Heroku)

% brew tap heroku/brew && brew install heroku

% heroku update

% heroku version            

heroku/7.53.0 darwin-x64 node-v12.21.0

% heroku login

heroku: Press any key to open up the browser to login or q to exit:

...

Logging in... done

see https://devcenter.heroku.com/articles/heroku-cli for more detail


prepare project

% mkdir heroku

% cd heroku

% vim index.php

<?php

echo "Hello, World!";

% git init

% git add .

% git commit -am 'init'


create app

% heroku create

You can see the detail from https://dashboard.heroku.com/apps/


deploy

% git push heroku master

% heroku open


cleanup

% heroku apps:destroy


Comments

Popular posts from this blog

Selenide: Quick Start

Minikube Installation for M1 Mac

Three.js Quick Start - Run Spinning-Cube Example