3. Creating your first Heroku app
Tags: heroku, devops, beginners, webdev
Published: 2022-08-08 13:10:00

Welcome back!

From previous articles in this series we introduced Heroku as a platform that allows developers to build and deploy and host application easily, we also got started with the Heroku CLI which allow us to manage our application using the command line. 
In this part we will be creating our first Heroku application using both the Heroku CLI and the Graphical user interface (Dashboard).

**1. Heroku app**
To have your application running on Heroku you will need to create a  "Heroku app" which is just another instance of our app codebase that will be hosted on Heroku and will be run whenever someone requests our app domain name. 
You can create up to 5 Heroku applications with the default unverified Heroku account to create more apps you will need to provide your Credit card information. learn more about Heroku account verification [HERE](https://devcenter.heroku.com/articles/account-verification)

To create a new application you need to have the application name which must be unique since it will be used to generate your app domain name. By default your app will be deployed on **"yourappname.herokuapp.com"** for instance if your app is named _"foobar"_ it will be deployed on _**foobar.herokuapp.com**_

**2. Creating Your first Heroku app**

**Using Heroku dashboard**
To create your first application make sure you are logged in the browser and go to your dashboard on [dashboard.heroku.com](https://dashboard.heroku.com/) and find the "create new app" button 

![Heroku Dashboard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c7yetg1dr31urws2j3yf.jpg)

You will be asked to provide app name which: 
- Should be unique they will ask you to choose a different name if the name is already used by someone else
- Should contain only lowercase letters, number or dashes.

You will be asked to choose the region which will be the region where your app server is located, you are supposed to choose the region near you but any location will do.

![Heroku create app form](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9ccjwx221brrn2jdiruh.png)
 
That's it! Your new Heroku app is created and it can be accessed on yourappname.herokuapp.com but currently it will not work because we haven't added content yet.

**Using Heroku CLI**
You can also create and manage your application in the command line using the Heroku CLI. you will need to be logged in your Heroku CLI. to get started with the Heroku CLI check the second article in the series [HERE](https://dev.to/yvad60/2-getting-started-with-the-heroku-cli-nn4)

To create the application run the following command

```
heroku create yourappname
```
- the command `heroku create` will create a new app with the name we have specified and same the app will be available at yourappname.herokuapp.com

Note: app name standards described above still apply for the CLI as well

To specify the region in the CLI you will need to add the region flag (--region)

```
heroku create yourappname --region eu
```
- in this example we are specifying the region to be Europe If you don't specify the region the default will be United states.

That's all. We have created our first app using the Heroku dashboard and CLI and we got ourselves a domain for everyone to access our application. In the following article we will look into getting content to our Heroku app for our users

see you there...

**References**

- [Heroku account verification](https://devcenter.heroku.com/articles/account-verification)
- [Heroku available regions](https://devcenter.heroku.com/articles/regions)
- [Creating Apps from the CLI](https://devcenter.heroku.com/articles/creating-apps)