I am wondering if there is a way to deploy a static html application to heroku without disguising it as a php application.
I have it working using the following answer. Is it possible to upload a simple html and javascript file structure to heroku?
However I find it odd that you can't just send up a straight html application. Especially since it's a common use case to just have a simple html app act as a shell for SPAs
Anyone know of a way to do this. I get the error Heroku push rejected, no Cedar-supported app detected if I try without the php disguise trick...
The way I have done this is just by using the node.js build.
Just throw this in the index.js and put all your files in the /public folder under your main app folder.
var express = require('express');
var app = express();
app.set('port', (process.env.PORT || 5000));
app.use(express.static(__dirname + '/public'));
app.listen(app.get('port'), function() {
console.log("Node app is running at localhost:" + app.get('port'))
});
Make a Procfile with
web: node index.js
And make a basic Package file which can be done w/ npm
I have an angularjs site running with that with all my dependencies in /public
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With