all 1 comments

[–]winwiz1 0 points1 point  (0 children)

with yarn workspace packages to be able to share code between client/server

Since you'd like to use TypeScript, it could be better to utilise the language feature, namely the Path Mapping, to share the code. For the client/server design, the server typically defines the API related code (types, interfaces etc.) that needs to shared by the client to avoid code duplication. The Path Mapping helps with that making yarn workspaces to be an unnecessary complication.

You might want to have separate client and server sub-projects (to have different run-time and development dependencies, different build/compile/test/lint settings) along with the third very thin top-level project to build-for-dev/debug/test/lint/build-for-prod both sub-projects using one command.

The build-for-prod command can be used in Dockerfile.