Nx
Overview
Nx is a smart, fast, extensible build system with first class monorepo support and powerful integrations.
Analog provides integration with Nx monorepos and workspaces through a workspace preset and an application generator. An Analog application can be created as a standalone project or added to an existing Nx workspace.
Creating a Standalone Nx project
To scaffold a standalone Nx project, use the create-nx-workspace
command with the @analogjs/platform
preset.
Create a new Nx workspace with a preconfigured Analog application:
npx create-nx-workspace@latest --preset=@analogjs/platform
The Analog preset prompts you to provide the name of your application. In this example, we simply use analog-app
.
Additionally, asks whether you would like to include TailwindCSS and tRPC in your new project.
If you choose to include either of them, all the required dependencies are installed automatically,
and any necessary configurations is added.
Serving the application
To start the development server for your application, run the nx serve
command.
npx nx serve analog-app
Navigate to http://localhost:4200
in your browser to see the application running.