Deploying a NestJS app for Free on Cyclic

IntroductionIn this article, we’re going to deploy a Nestjs app for free on CyclicCyclic is a cloud platform that provides an easy way to deploy and manage your applications. Their free tier comes packed with some great features.First off, unlike other…


This content originally appeared on Level Up Coding - Medium and was authored by Hayk Simonyan

Introduction

In this article, we’re going to deploy a Nestjs app for free on Cyclic

Cyclic is a cloud platform that provides an easy way to deploy and manage your applications. Their free tier comes packed with some great features.

  • First off, unlike other services, your apps will never sleep due to inactivity timeouts or delays. This means your app will be up and running all the time.
  • Secondly, there are no hourly limits and until you reach 100,000 API requests per month, you can use the free tier.
  • As of now, Cyclic supports two programming languages: JavaScript and TypeScript, and Python beta is behind the waitlist.

Let’s get started with our deployment

Step 1: Registration and Setup

  • First, we need to create a new account on Cyclic. Visit their website and sign up using your GitHub account credentials
  • If you haven’t already, push your application code to a GitHub repository so that Cyclic can use that repository to deploy your app
  • One important thing here — by default, the start command in your package.json file will be nest start, make sure to update it to node dist/main, so that it serves the compiled main.js file from the dist folder. This dist folder will be created automatically after Cyclic starts to build your app with the nest build command

Step 2: Deployment

Now we can go to the cyclic dashboard and click on the “Deploy Now” button to start deploying our Nestjs application

From here, go to “Link Your Own” tab, and select the GitHub repository which you want to deploy

Click “Connect Cyclic” to allow it to connect

After that it will start to build the app, installs the dependencies and deploys our app

Now, if you have environmental variables, you’ll get a warning like this. To configure your secrets, go to the projects dashboard

Under the “Variables” tab you will find the variables which you need to add, Cyclic automatically detects all your env variables and add’s their keys here, or you can add them as a file, so if you have a .env file, you can just copy and paste the content here, that will also work.

After you have added the env variables, you need to go to the deployments tab and re-deploy your app, so that it picks up the variables.

Step 3: Verifying

Now your app should be up and running, go to the “Overview” tab and open up the URL of your Nestjs API

Some of the useful tabs in this dashboard are

  • The “Deployments” tab is where you can check your latest deployments or initialize a new one
  • The “Logs” tab is where you can monitor the app logs
  • And in the “Environments” tab where you can apply a custom subdomain to your app

Thanks for reading! If you enjoyed this article, don’t forget to clap, comment, and follow for more content. Let’s connect for updates on similar topics and to stay in touch!

✍️ Medium: https://hayk-simonyan.medium.com

🧑‍💻 GitHub: https://github.com/hayk-simonyan

💼 LinkedIn: https://linkedin.com/in/hayksimonyan

🌐 Website: https://hayk-simonyan-dev.web.app/contact


Deploying a NestJS app for Free on Cyclic was originally published in Level Up Coding on Medium, where people are continuing the conversation by highlighting and responding to this story.


This content originally appeared on Level Up Coding - Medium and was authored by Hayk Simonyan


Print Share Comment Cite Upload Translate Updates
APA

Hayk Simonyan | Sciencx (2023-05-01T03:07:57+00:00) Deploying a NestJS app for Free on Cyclic. Retrieved from https://www.scien.cx/2023/05/01/deploying-a-nestjs-app-for-free-on-cyclic/

MLA
" » Deploying a NestJS app for Free on Cyclic." Hayk Simonyan | Sciencx - Monday May 1, 2023, https://www.scien.cx/2023/05/01/deploying-a-nestjs-app-for-free-on-cyclic/
HARVARD
Hayk Simonyan | Sciencx Monday May 1, 2023 » Deploying a NestJS app for Free on Cyclic., viewed ,<https://www.scien.cx/2023/05/01/deploying-a-nestjs-app-for-free-on-cyclic/>
VANCOUVER
Hayk Simonyan | Sciencx - » Deploying a NestJS app for Free on Cyclic. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2023/05/01/deploying-a-nestjs-app-for-free-on-cyclic/
CHICAGO
" » Deploying a NestJS app for Free on Cyclic." Hayk Simonyan | Sciencx - Accessed . https://www.scien.cx/2023/05/01/deploying-a-nestjs-app-for-free-on-cyclic/
IEEE
" » Deploying a NestJS app for Free on Cyclic." Hayk Simonyan | Sciencx [Online]. Available: https://www.scien.cx/2023/05/01/deploying-a-nestjs-app-for-free-on-cyclic/. [Accessed: ]
rf:citation
» Deploying a NestJS app for Free on Cyclic | Hayk Simonyan | Sciencx | https://www.scien.cx/2023/05/01/deploying-a-nestjs-app-for-free-on-cyclic/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.