Deploy your Nodejs + Auth0 REST API to Cyclic.sh under 4 minutes
Tags: node, cyclic, auth0, tutorial
Published: 2021-12-16 06:15:45

Deploying APIs can sometimes be a pain in the butt when your service provider overcomplicates the deployment and setup process. This short article will demo how to deploy your Restful Nodejs application to Cyclic.sh in less than 4 minutes.

Yes!, you heard right, less than 4 minutes🔥😱😱.

![from cyclic.sh homepage](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ju588ozkufwtgfmrkkwc.png)
 
Cyclic is a provider that helps you Launch your API in seconds. Push your code to Github and let the CI/CD (continuous integration/continuous delivery) integration trigger and deploy your service onto a global infrastructure in seconds. No cryptic CloudFormation errors. No mysterious API Gateway errors. No YAML parse errors. No hunting for CloudWatch log groups. No wasted time.

**Important!**
I already have my Nodejs Auth0 backend done.

To follow along with this project, clone the repo from [here](https://github.com/RegNex/nodejs-auth0).

**Deployment Demo**
To deploy your codebase, follow the following steps:
The first thing you must do is create a repository on github.com for your project and push your code.

![Github repo create page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7l6gxq0nzuffpztuh6vn.png)
 
Next, signup to [Cyclic.sh](https://cyclic.sh). The signup process is seamless, and all you need is to signup using your Github account.

![cyclic.sh signup page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g9no1gx3n3rxpblrvvjr.png)
 
After successful signup, you will see a dashboard; where all the magic happens. You can locate the docs at the top right corner, just right before the profile.

![locate docs at the top right corner](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xfnh1tni5f6l2q58lcm9.png) 

Now you need to deploy your code. Click the "deploy" button (green button) and select the "Link your own" tab.

![deploy button](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/shygfa923tsbuioxb0gk.png) 


![link your code from Github](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c8kbcfz87vlctfur7cow.png) 

Search for the repo you want to deploy, in your case "nodejs-auth0," and select it and connect it to your Github account.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/znur4kmxjgybngrlyi19.png) 

At the prompt, you need to confirm your Github access, and after confirming, all you have to do is to approve and install, and that's it 🎉

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pu5c2blnvkg5hbaznjlg.png) 

Once you approve and install, the deployment process will start. 2–3mins should do it 🎊🎉🎊🎉🎊🎉

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6mlj6q01uhd7u24g6o6r.png) 

The final step is to set your environment variables on the dashboard. The dashboard for your project looks like this.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0a23mtm2nt5unyp1gohk.png) 

This is a ".env" file; you can also include those configurations on the dashboard by clicking on "Variables." After this configuration, everything should be up and running 🔥

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fpk47xpnf1rd6oflgsuc.png) 

**Deploying new changes**
After all the setups and configurations, to deploy new changes, push your code to Github, and Github actions will do the rest 😀😉

**Conclusion**
Deploying a RESTful API shouldn't be hectic and cyclic.sh has made sure deploying your backend code to the cloud is a simple as possible.

If you find any difficulty in the deployment process, you can reach out to the [cyclic.sh](https://cyclic.sh) team on [discord](https://discord.com/invite/huhcqxXCbE).

Do well to follow me on [Twitter](https://twitter.com/_iamEtornam) and [LinkedIn](https://www.linkedin.com/in/etornam-sunu/) to connect.

_originally publish on [medium.com](https://etornam-sunu.medium.com)_