$ mkdir ~/dev/spark && cd $_
nx
workspace$ npx create-nx-workspace
Choose the following options from the prompts
$ npx create-nx-workspace
NX Let's create a new workspace [<https://nx.dev/getting-started/intro>]
✔ Where would you like to create your workspace? · spark-starter-kit
✔ Which stack do you want to use? · none
✔ Package-based monorepo, integrated monorepo, or standalone project? · integrated
✔ Which CI provider would you like to use? · skip
✔ Would you like remote caching to make your build faster? · skip
$ code spark-starter-kit
# Execute in the newly created project root. eg. ~/dev/spark/spark-starter-kit
# Add @nx/angular dependency
$ npx nx add @nx/angular
# Generate an angular application
$ npx nx g @nx/angular:application \\
--name=webapp \\
--bundler=esbuild \\
--directory=apps/webapp \\
--addTailwind=true \\
--minimal=true \\
--prefix=spark \\
--style=scss \\
--no-interactive
More: https://nx.dev/nx-api/angular/generators/application
Now, you can serve your application using https://nx.dev/nx-api/nx/documents/run
$ npx nx run webapp:serve
You should be able to see your application at http://localhost:4200/
$ npx nx g @nx/angular:library \\
--name=ui \\
--buildable=true \\
--directory=libs/webapp/ui \\
--addTailwind=true \\
--changeDetection=OnPush \\
--prefix=spark \\
--projectNameAndRootFormat=as-provided \\
--skipModule=true \\
--style=scss \\
--no-interactive