Skip to content

Instantly share code, notes, and snippets.

@naterexw
Last active January 4, 2016 07:15
Show Gist options
  • Save naterexw/5ab83e21d5a85d16ef33 to your computer and use it in GitHub Desktop.
Save naterexw/5ab83e21d5a85d16ef33 to your computer and use it in GitHub Desktop.
================
= Heroku fonts =
================
Remember to use HTTPS when importing fonts onto SASS stylesheets in Rails
example: @import url(https://...);
heroku help
heroku help [command]
heroku apps:create [name]
heroku apps:rename [newname]
heroku apps:destroy --app [name] --confirm [name]
================
= STATIC SITES =
================
Heroku allows you to publish PHP sites as well, with NO configuration needed!
That’s right, just create your .php files, and it will figure out that the Heroku app should run PHP for this site, and it will auto-configure the app to run on the latest version of PHP/Apache.
So here is how you do it:
Rename your index.html to home.html or something similar.
Create an index.php file with the following code:
<?php include_once("home.html"); ?>
That’s it!
Now go to your app folder in CMD (or Bash), and commit your code to Heroku using the following:
git add .
git commit -am 'wrap HTML in PHP wrapper for Heroku'
git push heroku master
And finally, you should get the following:
-----> Heroku receiving push
-----> PHP app detected
-----> Bundling Apache version 2.2.22
-----> Bundling PHP version 5.3.10
-----> Discovering process types
Default types for PHP -> web
-----> Compiled slug size: 9.5MB
-----> Launching... done, v4
Congratulations! You have published a static site to Heroku with one line of PHP code :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment