bpmn-io / bpmn.io

The bpmn.io website sources.
https://bpmn.io
155 stars 99 forks source link

Prepare migration to Heroku #90

Closed barmac closed 3 years ago

barmac commented 3 years ago

This PR:

  1. Prepares the website to be hosted on Heroku with express and st.

This is the platform we know and the configuration of the server is based on what we use at demo.bpmn.io.

  1. Replaces relative links with absolute links.

The latter is because relative links would not work if we didn't append a trailing slash. E.g. <a href="../bpmn-js">bpmn-js</a> would work from http://bpmn.io/toolkit/dmn-js/ but not from http://bpmn.io/toolkit/dmn-js.

We used to have such a rule on Apache which currently serves the website. One could ask why I did not just have a similar rule. The reason why I decided against it is that if we ever want to use static hosting solution, e.g. AWS S3 + Cloudfront, we would also have to think about how to solve the relative links problem. With absolute linking, the problem does not exist.

nikku commented 3 years ago

Proposal: Keep local links wrapped in a helper so we can still find them across the site.

barmac commented 3 years ago

Do you expect something like https://github.com/bpmn-io/bpmn.io/pull/90/commits/4e1f588d58431c4945fefb663365d65e876fc23e?

nikku commented 3 years ago

Exactly. Not getting rid if the "this is a local link" knowledge is important.

barmac commented 3 years ago

I see that I will yet need to adjust a few markdown links. I'll poke you when it's complete as suggested.

barmac commented 3 years ago

@nikku @MaxTru ready for review

MaxTru commented 3 years ago

Great job <3 can be merged IMO!

barmac commented 3 years ago

One thing we could consider: Also run the server during development setup (npm run dev) so we know it actually works.

But that is a minor thing that I'm fine to ignore for now 🙈.

Looks fine other than that.

Implemented via https://github.com/bpmn-io/bpmn.io/pull/90/commits/af9422d996ae77cdc9b991056fff2933c8a6ce0b

I will merge this now and proceed with the domain migration.