How to deploy flutter web on Heroku - flutter

I built a web application in Flutter and run the command flutter build web successfully. I'm trying to find a way to deploy it on Heroku like my react applications but found nothing in Heroku documentation.

we run flutter web or static page run with the help of php.we can use many other language .we can simply use php without any more work.
First
create app in heroku after this will shown .
after run flutter build web in the root of the project folder it will generate static content in build/web .copy the file to any other directory and open cmd like this
create two file index.php and composer.json
in index.php
add this
<?php include_once("index.html");
in composer.json
add this (braces)
{}
after run the command in the
`heroku login`
heroku git:clone -a appname
git add .
git commit -am "make it better
git push heroku master
after running this it may be show any error .if not show any error
run this https://appname.herokuapp.com/#/ .your website will be live.

Try these simple steps.
first, you need to create your app on Heroku, after typing the commands in your project directory console
heroku login
git init
heroku git:remote -a [your app name in heroku]
git commit -m "[your commit message]"
heroku buildpacks:set diezep/flutter -a [your app name]
git push heroku master

Related

How to develop custom cocoa-pod of your existing Xcode project?

If you want to create you own cocoapods with storyboards, XIBs, resources and with other frameworks such as Alamofire, MBProgressHUD etc.
Easy steps to create Cocoapod from existing xcode project
Create a repository on your git account (Repo name, check README,
choose MIT under license).
Copy the url of your repository.Open terminal and run following command.
git clone copied your repository url
Now copy your Xcode project inside the cloned repository folder on
your Mac. Now run following commands
git add -u to add all files (if not added use: git add filepath/folder)
git commit -m "your custom message"
git push origin master
Create a new release to go to your git repository or run following commands
git tag 1.0.0
git push --tags
First, we need to make sure that you have CocoaPods installed and
ready to use in your Terminal. run the following command:
sudo gem install cocoapods --pre
Creating a Podspec 
All Pods have a podspec file. A podspec, as its name suggests,
defines the specifications of the Pod! Now let’s make one, run
following command on terminal
touch PodName.podspec
After adding and modifying your .podspec file. Validate your .podspec
file by hitting following command on terminal
pod lib lint
Once you validate it successfully without errors run following
command to register you and build cocoapod respectively
pod trunk register  
pod trunk push PodName.podspec
If all goes well, you will get this on terminal
🚀 PodName (1.0.0) successfully published
📅 February 5th, 02:32
🌎 https://cocoapods.org/pods/PodName
👍 Tell your friends!
Yeah!!!!! congrats you have got your pod link. Use wherever you want to use it.
Here is some useful links . You can follow the same.
https://www.appcoda.com/cocoapods-making-guide/
https://www.raywenderlich.com/5823-how-to-create-a-cocoapod-in-swift

Web Server for Progressive web apps

I am a beginner to developing a Progressive Web Apps, as i have used Chrome Web Server initially to host my progressive web application.But i don't know how to host my PWA app on other web server.
Your help will be appreciated!
Get a GitHub account, install GitHub software, and commit some code to your repo
Get a free Heroku account, and install Heroku CLI on your computer.
Point your Heroku account, in its configuration, to your Git repo's master branch
If your app consists of static files, follow the following instructions (Heroku only hosts non-static sites):
Add a file called composer.json to the root directory by running:
touch composer.json
Add a file called index.php to the root directory by running:
touch index.php
Rename the homepage (e.g. index.html) to home.html
In index.php, add the following line:
<?php include_once("home.html"); ?>
In composer.json, add the following line:
{}
From a command line, CD into your project's root directory. Run the following command:
git push heroku master
You should now have a staging server on Heroku, with https enabled. Whenever you commit code to your master branch and sync it with GitHub.com, there will automatically be a deployment behind the scenes from your GitHub repository to your Heroku hosting account. Boom! You have all the ingredients you need to stage a successful PWA application. Production hosting is up to you, maybe try DigitalOcean to start with.

Error: Deploying a HelloWorld application to Heroku (Play 2.3.2)

I am trying to deploy a hello world application to heroku.com.
I followed the steps on: playframework.com but it doesn't work.
All steps I made can be viewed here:pastebin.com.. Which steps am I missing?
The issue was solved, after I updated play, sbt (..) using brew update.
Now I can deploy a new project with these commands ():
heroku login
play new appName
cd appName
git init .
git add -A
git commit -m "init"
heroku create
git push heroku master

Octopress app on Heroku shows only a Blank page

This is my first time using Octopress, although I've deployed multiple rails apps to heroku. Whatever I do, I unable to deploy my Octopress app to heroku. When I do, all I get is a blank page.
What I did was:
git clone git://github.com/imathis/octopress.git
cd octopress
bundle install
rake install
rake preview # working on localhost
heroku create
git add .
git commit -m "yo"
git push heroku master
heroku open
But it always shows a blank page. I'm obviously missing something very stupid. Any help would be appreciated.
I had the same problem. You will need to push at least one blog post. Once you have your first post, your blog will come up instead of the blank page. When you add more posts and/or modify existing ones don't forget to use "rake generate" (like I forgot and then did not understand why the posts on Heroku don't update).

airbrake:heroku:add_deploy_notification with multiple apps

Attempting to set up deploy notifications to Airbrake on Heroku deploy with rake airbrake:heroku:add_deploy_notification when you have multiple Heroku apps (i.e. git remotes) will yield:
! Multiple apps in folder and no app specified.
! Specify app with --app APP.
It appears Airbrake are aware of this but no real solution is offered.
Is there a work around?
Prior to running rake airbrake:heroku:add_deploy_notification you can set a default Heroku remote by setting a git config heroku.remote to the desired branch.
So for example, to set up apps whose Heroku remotes are staging and production, you can:
$ git config heroku.remote staging
$ rake airbrake:heroku:add_deploy_notification
$ git config heroku.remote production
$ rake airbrake:heroku:add_deploy_notification
$ git config --unset heroku.remote
A fix has now been pushed for this.
You can set the environment variable HEROKU_APP to the name of the app.