Did I tell you that I am a big fan of Glitch ! If you don’t know what that is, read up here. I have used this platform in meetups and workshops to very quickly build and deploy web applications. A lot of my work is done on IBM Cloud (hosted CloudFoundry), and it is fairly easy to deploy a Glitch app on the IBM platform. I have a simple ExpressJS application on Glitch. In fact, this it the default Express template.
Steps to deploy a Glitch app to IBM Cloud or Cloud Foundry
- Add a manifest.yml file to your Glitch application root folder.
- Download the code.
- Push to Cloud Foundry or IBM Cloud!
Wait that’s it ! Yes , all you need is a manifest file that tells CloudFoundry how to deploy the application. You can read more on the CloudFoundry documentation. There are a lot of attributes you can play with, but for our example, we just need to set the name and memory as follows:
applications: - name: upkar-sample memory: 128M
The first line is listing all the applications in yaml list format. We just have one. We need to give it name that will be used to create the URL and additionally, we need to set the memory. This is an optional attribute, but defaults to 1GB causing IBM Cloud to fail if you are using a free tier which only allows 256MB at this time.
Once you have the manifest file in place, you can log into ibmcloud using the cli and simply deploy to cloud. Learn more about how to install and work with IBM Cloud here.
Here is the whole process in action.
The app is can now be used at the URL provided by IBM Cloud CLI
That’s all folks !
Top comments (0)