Try different npm workspaces.
npm install
npm run serve
access to http://localhost:3000 on browser.
npm run test
# add workspace
npm init -w workspace-xxx
# there is no command to remove a workspace
# remove the workspace directory and remove the workspace entry in the root package.json
# add package-xxx to shared
npm install package-xxx -w shared
# the same command is used for workspace dependencies
npm install shared -w server
# remove package-xxx to shared
npm uninstall package-xxx -w shared
# remove package-xxx on all workspace
npm uninstall package-xxx -ws
# run a script-xxx of the root package.json
npm run script-xxx
# run a script-xxx of the shared package.json
npm run script-xxx -w shared
# or
cd shared
npm run script-xxx
# run a script-xxx of all workspace package.json
npm run script-xxx -ws
# run ts-node xxx.ts
npx -w shared ts-node xxx.ts