Deploying a NestJS app for Free on?Cyclic

Deploying a NestJS app for Free on?Cyclic

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

No alt text provided for this image

Step 2: Deployment

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

No alt text provided for this image

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

No alt text provided for this image

Click “Connect Cyclic” to allow it to connect

No alt text provided for this image

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

No alt text provided for this image

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.

No alt text provided for this image

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

#nestjs #cyclic #nest #nestjsdeployment #nodejshosting


Nditah Samweld

?? Robotics - AI - Web3 - DevOpsSec | Researcher | Tech Leader ??

9 个月

Cyclic is shutting down. New signups are disabled. Free tier after May 10th. Paid tier after May 31th.

回复

要查看或添加评论,请登录

Hayk Simonyan的更多文章

  • Beginner’s Guide to Prompt Engineering with ChatGPT

    Beginner’s Guide to Prompt Engineering with ChatGPT

    Intro Prompt Engineering is one of the highest-leverage skills that you can learn in 2023. Whether you’re developing…

  • Functional Programming Simplified

    Functional Programming Simplified

    Introduction Functional Programming revolves around the principle of separating concerns, specifically the separation…

  • REST vs GraphQL

    REST vs GraphQL

    Introduction RESTful and GraphQL APIs are two popular choices for building web APIs, each with its own strengths and…

  • React Lifecycle Methods and Their Equivalents in Functional Components

    React Lifecycle Methods and Their Equivalents in Functional Components

    React is the most popular JavaScript library for building user interfaces, and it provides a set of lifecycle methods…

    1 条评论
  • Master TypeScript Interviews

    Master TypeScript Interviews

    Intro Are you preparing for a TypeScript interview and want to know what to expect? In this article, we'll go over the…

  • 7 Design Patterns You Should Know

    7 Design Patterns You Should Know

    What are Design Patterns? Design patterns are repeatable solutions to commonly occurring problems in software design…

  • What is Dependency Injection?

    What is Dependency Injection?

    Dependency Injection (DI) is a programming design pattern that makes a class independent of its dependencies. It…

  • OOP Concepts Simplified

    OOP Concepts Simplified

    Intro In this article, we’ll look at the core OOP concepts with real code examples, which will make it easier for you…

  • Deploying Your Website to Firebase

    Deploying Your Website to Firebase

    Introduction In this article, we will deploy your website frontend to Google Firebase for FREE in less than 5 minutes…

  • How to Upload and Sell Your Web Template on Themeforest

    How to Upload and Sell Your Web Template on Themeforest

    Introduction This article is a complete guide on uploading and selling your web templates on Themeforest. What is…

    2 条评论

社区洞察

其他会员也浏览了