How to show your app version in a nextjs application

--

I often want to display my app version in the footer of the website I’m creating like my crypto staking and lending rates comparatorhttps://stakingcrypto.io.

With nextjs, it’s rather easy by using next.config.js and publicRuntimeConfig

Here you go !

Ok but I want to include my commit number instead

Well, this is a lot more difficult, especially if you have CI and docker involved so I decided to deploy every version with a different tag number to ease my particular process

But if you still need this feature, take a look at https://artsy.github.io/blog/2018/09/10/Dockerhub-Stamping-Commits/

Hire me remotely!

My name is Martin Ratinaud and I’m a senior software engineer and remote enthusiast, contagiously happy and curious.
I create websites like StakingCrypto.io, OpenTermsArchive.
I create bots to aggregate data and build Remote Family with them.
I create Backoffices and internal tools for marketers and growth specialists.
I also create chrome extensions to help artists earn money and block dropshipping and electron apps to sort your paper with AI.
All this in NodeJs and React which I love very much.

Check my LinkedIn and get in touch!

--

--

Martin Ratinaud. Startup Freelancer.

Remote no-ego Doer. Full stack JS architect/team lead. @stakingcryptoio @remote_family. father of 2, former CEO, lifehacker and no-ego doer.