Skip to content

Instantly share code, notes, and snippets.

@juristr
Created January 21, 2020 13:38
Show Gist options
  • Save juristr/776ed569eb067c24c2936b01a5a000a5 to your computer and use it in GitHub Desktop.
Save juristr/776ed569eb067c24c2936b01a5a000a5 to your computer and use it in GitHub Desktop.
Generate empty node app with Nx

You could generate an empty workspace like

$ npx create-nx-workspace expresswrkspace

and choose "empty" when being asked for a preset.

Then add node support with

$ npm i @nrwl/node

and generate a new empty node app like

$ nx g @nrwl/node:app myapp

From there you can add express etc.

@akumbhani66
Copy link

nx g @nrwl/node:app myApp framework=express directory=backend js=true --verbose

possible options: https://nx.dev/packages/node/generators/application#options

@juristr
Copy link
Author

juristr commented Jan 18, 2023

@akumbhani66
Yeah this is a veeeery old Gist. We at Nx are actually currently working on a ton of improvements for Node 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment