Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mmzk1526/flutter-heroku-buildpack
Heroku Buildpack for Flutter Web Apps
https://github.com/mmzk1526/flutter-heroku-buildpack
flutter heroku
Last synced: 10 days ago
JSON representation
Heroku Buildpack for Flutter Web Apps
- Host: GitHub
- URL: https://github.com/mmzk1526/flutter-heroku-buildpack
- Owner: MMZK1526
- Created: 2023-06-07T23:08:17.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-06-08T09:06:01.000Z (over 1 year ago)
- Last Synced: 2024-11-07T19:49:19.411Z (2 months ago)
- Topics: flutter, heroku
- Language: Shell
- Homepage:
- Size: 6.84 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Heroku Buildpack for Flutter
## Introduction
A Buildpack that enables the deployment of Flutter Web Apps on Heroku.
It is inspired by this [Buildpack](https://github.com/diezep/heroku-buildpack-flutter) by [diezep](https://github.com/diezep). Originally a fork to fix a bug, it is now a more lightweight version without relying on a forked version of `dhttpd`.
## Setup
To add this Buildpack to your Flutter Web App hosted on Heroku, simply copy the [link](https://github.com/MMZK1526/flutter-heroku-buildpack) of this repository and paste it in Buildpacks. Alternatively, you can enter the Buildpack URL `mmzk1526/flutter`.
## Why making one more Buildpack?
The original Buildpack was using a forked version of `dhttpd` to serve the files. Because of that, it has been out of date for a while, and it no longer works with the latest version of Dart.
The reason for the (original) fork is to make the server look for the `$PORT` environment variable, which is provided by Heroku on deployment. It is avoided in this Buildpack by using the `--port` flag of `dhttpd` and pass in the `$PORT` environment variable. In this way, it should work with future versions of `dhttpd`.
Since then, I silenced a few warnings, removed some configurations to make it more lightweight (and less versatile, but it meets my needs anyway), and added a (very simple!) check to determine if the project is indeed a Flutter Web App.