/nx-monorepo-sample

Sample monorepo with NX

Primary LanguageTypeScript

MonorepoTest

This workspace has been generated by Nx, a Smart, fast and extensible build system.

You can generate a similar project using the ts preset like so:

npx create-nx-workspace my-workspace --preset=ts

This will set up the @nrwl/js plugin for you, which allow us to generate packages easily with TypeScript already configured for us. You can read more here: https://nx.dev/packages/js

Understand this workspace

Run nx graph to see a diagram of the dependencies of the projects.

Generating a library/package

nx g @nrwl/js:lib my-buildable-lib --buildable

Generating an express application

npx nx generate @monorepo-test/my-plugin:express-app test-express

Generated express app will have some features by default:

  • Typescript ready
  • Increased security with Helmet middleware
  • Requests logging with Morgan
  • Rate limiting