npm exec --workspace=packages/api -- node server.js

Category: Node.js & npm/yarn

npm exec --workspace=packages/api -- node server.js

Execute a command inside the environment of a specific workspace package

Executes a command inside a specific workspace's environment — the command resolves binaries from that workspace's node_modules.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.