bars icon
magnifying-glass icon

Ionic

Deployment

Step 1. Create a service

To deploy an Ionic application, click Create in the top-left corner of your Dashboard and choose Front-end app or static website.

enter image description here

Step 2. Select the project to deploy

If you are logged in to Hostman with your GitHub, GitLab or Bitbucket account, at this point you will see the repository with your projects, including the private ones.

enter image description here

To access a different repository, click Connect another repository.

If you didn’t use your Git account credentials to log in, you’ll be able to access the necessary account now, and then select the project.

Step 3. Configure the build settings

You'll see the Website customization window.

First, select the framework you used for your Ionic app:

  • Angular
  • React
  • Vue

Then you’ll need to fill in the directory name and the build command.

The directory with app points at the directory that will contain the project's files after the build.

The build command option allows you to customize the build process. You can enter multiple commands separated by &&.

The settings will vary depending on the framework.

Angular

For an Angular-based project the directory name will most likely be www (it is shown in the outputPath value in your angular.json file). The default build command is yarn build.

enter image description here

React

For a project based on React you can leave the directory name empty and use the default build command: yarn build.

enter image description here

Vue

For a Vue-based project use the default parameters: dist for the directory name and npm run build for the build command.

enter image description here

Step 4. Deploy

Click Deploy to start the build process.

Once it starts, you will enter the deployment log. If there are any issues with the code, you will get warning or error messages in the log, specifying the cause of the problem.

Usually the log contains all the debugging data you'll need, but we are also here to help you solve the issues, so do not hesitate to contact us via chat.

When the deployment is complete, you will receive an e-mail notification and also see a similar log entry:

enter image description here

All done!

Your project is up and ready.