How to host one-page generated on the Flatlogic Platform applications on Heroku

Application Development

Tap here and let’s go!

First of all, you need to set up the name of your application.

Next, you need to choose the Stack: Frontend, No-Backend and go to the next step.

Next, you’re choosing the starter template.

Next, you can connect your GIT repository for further work with it, or skip this step and 'Finish and Deploy' your Project.

If you click on GitHub the ‘Login’ window opens next, where you need to enter login details for your GitHub account or sign in. Next, the ‘Choose a name for your repository’ window opens, where you have to choose a name for your repository and select privacy terms.

Afterwards, you will be redirected to the settings of your application.

Working with GitHub

If you didn't connect the GitHub repository when you were creating the app, you can connect it in the Settings tab by clicking on Push to GitHub button.

The ‘Login’ window opens next, where you need to enter login details for your GitHub account or sign in.

Next, the ‘Choose a name for your repository’ window opens, where you have to choose a name for your repository and select privacy terms.

After this step, the Flatlogic Bot creates a GitHub repository for you and uploads your code there. Afterwards, you can work with the platform or with your GitHub repository.

Also, you can make changes to your code in your GitHub repository. But make sure you’re working on the right bench.

GitHub is connected to Flatlogic hosting, all deployments go directly from there. There are two branches: master & generated. Master - is for you to make changes directly in the source code. Generated is for Flatlogic Bot to make changes to the generated code. You can initiate a Flatlogic Bot commit by pressing on push to GitHub button after making changes to the app. After this, you need to create a pull request and merge generated branch into the master. It is better not to work with the Generated branch and leave it to Flatlogic Bot.

To clone your project to your IDE, click on the green button Code and the pop-up menu click on or copy the link neer this button.

Next, go to your IDE and on the starter page click on Clone Git Repository…

Paste the copied Git Repository and Enter.

Next, you will see the pop-up ‘Whould you like to open the cloned repository?’, please, choose how would you like to open your project.

Working with Heroku

Next, go to Heroku.com, Sign in or create new account and go to the Dasboard. In the right upper corner click on New and choose Create new app.

Set the name to your application and click on Create app.

Next, you will be redirecetd to the Deploy page of your application and choose the Heroku Git as Deployment method.

Below you will find instructions on how to deploy your application with the Heroku Git. Let's consider each of the steps in more details:

  1. Go to the terminal of your IDE.

  2. Download and install the Heroku CLI.

  1. If you haven't already, log in to your Heroku account and follow the prompts to create a new SSH public key.

heroku login

Press any key to open up the browser to login or q to exit, afterwards, you will be redirected to the new window on your browser, please click on Log in button and go back to your IDE.

  1. Next, move to your project frontend folder

cd name-of-your-project/frontend

  1. Create a new Git repository, initialize a git repository in a new or existing directory:

git init

heroku git:remote -a name-of-your-project

  1. Commit your code to the repository and deploy it to Heroku using Git.

git add .

git commit -am "make it better"

git push heroku master

  1. For existing repositories, simply add the heroku remote

heroku git:remote -a one-page-project

  1. To open your application you have 2 options, first one using the terminal IDE

heroku open

Or go to the your application settings on Heroku website and click on Open app button.


                                               Google Cloud one-page app hosting →