Hi,
I wanna ask about Frontity deploy on Heroku.
Which step I have to follow? is that any different step which I should follow to deploy?
Kindly let me know,
Thanks
I think @juanma was working on a guide. If I’m not mistaken, it’s almost finished but missing “How to add a CDN” part.
@juanma could you confirm if this is true, and if it is, how to access the draft guide in the meantime?
This would be great, since everytime I try to deploy to Heroku I get this nasty error.
Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
Do you know how to fix that?
@driectdesign Figured it out!
When you deploy a Nodejs app to Heroku, you need to provide a start
script so that Heroku can run your app. The problem is Heroku “chooses” what port to use when running you app, so you can’t use the default 3000 or any other predefined port. You will need to edit your package.json
like this.
"scripts": {
"dev": "frontity dev",
"build": "frontity build",
"serve": "frontity serve",
"start": "frontity serve --port $PORT"
},
$PORT
is the environment variable Heroku uses to set the port for your app. When Heroku builds your app, it will load its own port configuration and build accordingly. Greetings!
Saved a lot of time
Just to add some more info over this topic.
There’s a PR opened in the documentation repository with a guide of how to deploy in Heroku.
The difference of deploying to Heroku vs deploying to Vercel is that Heroku doesn’t include a cache layer by default (as Vercel does) so to have a good performance this service is highly recommended
Here’s the conversation in progress about implementing a cache layer in a Frontity site deployed in Heroku
We have in the Documentation Roadmap the plan to include better guides on how to implement cache layers to Frontity sites (that are deployed in Heroku or any other hosting)
Getting error
This app may not specify any way to start a node process
remote: Heroku Node.js Support | Heroku Dev Center