Nx Cloud

No results

Help CenterGetting Started with Nx CloudSetting Up Your First Project with Nx Cloud

Setting Up Your First Project with Nx Cloud

Last updated March 21, 2024

Introduction

Embarking on your journey with Nx Cloud begins with setting up your first project. Nx Cloud, designed to supercharge your Continuous Integration/Continuous Deployment (CI/CD) pipeline, offers a seamless integration process for projects of any scale. This guide will walk you through the initial steps to get your project up and running on Nx Cloud, ensuring you can leverage its full suite of features to enhance your development workflow.

Prerequisites

Before you begin, ensure you have the following:

  • An Nx Cloud account. If you don't have one, sign up at  Nx Cloud's website .
  • Node.js installed on your machine.
  • The Nx CLI installed globally. If you haven't installed it yet, run npm install -g nx or yarn global add nx.

Step-by-Step Guide to Setting Up Your First Project

  1. Create a New Nx Workspace
  • Start by creating a new Nx workspace if you don't already have one. Open your terminal and run: perlCopy code npx create-nx-workspace@latest my-nx-workspace
  • Follow the prompts to configure your workspace. Choose the preset that best fits your project's needs.
  1. Install Nx Cloud Plugin
  • Once your workspace is ready, navigate into your workspace directory: bashCopy code cd my-nx-workspace
  • Install the Nx Cloud plugin by running: sqlCopy code nx add@nrwl/nx-cloud
  1. Connect Your Workspace to Nx Cloud
  • After installing the Nx Cloud plugin, connect your workspace to Nx Cloud: arduinoCopy code nx connect-to-nx-cloud
  • You'll be prompted to link your workspace with your Nx Cloud account. Follow the instructions provided.
  1. Configure Your Project for Nx Cloud
  2. Run Your First Nx Cloud-Enabled Command
  • Test your setup by running a command that utilizes Nx Cloud features, such as: cssCopy code nx run-many --target=build --all--parallel
  • This command builds all projects in your workspace in parallel, utilizing Nx Cloud's distributed task execution and caching.
  1. Monitor Your Project on Nx Cloud
  • Visit the Nx Cloud dashboard to monitor your project's activity. You can view build times, cache hit rates, and more, helping you to optimize your CI/CD pipeline further.

Conclusion

Setting up your first project with Nx Cloud is a straightforward process that unlocks powerful capabilities for your development workflow. By following these steps, you've laid the foundation for a more efficient, scalable, and maintainable CI/CD pipeline. As you become more familiar with Nx Cloud, explore its advanced features to fully harness the potential of your development ecosystem.

Was this article helpful?