Replies: 2 comments
-
I think this approach is simple . I also made the structure in this link's way |
Beta Was this translation helpful? Give feedback.
0 replies
-
You could make usage of NX Workspaces and setup the whole infrastructure following: nrwl/nx#836 (comment) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to share some code like Typescript type definitions and some basic functions to operate on these types between my Angular client and the firebase functions. These types would be used in the client to populate Firestore. Similar types are used in functions. And I've got some unit tests that will use shared functions to create these types, etc. Although I would assume this is a very common request I can't find much code or information about how to do it. I'm following the suggestions in the link below and got it working. Basically there is a
shared
folder at the root of my Angular CLI folder with a package.json in it. I build a private NPM package and copy it around to the client and server pieces. It requires some build automation so each time I change code in the shared folder the new private NPM package "tarball" is made and copied around, and then thenpm install
command is executed in these places.Is this a common need - to share some code between client and server?
Has someone written up a simple explanation for how to do it?
Is my approach the simplest way to do it?
https://fireship.io/lessons/how-to-structure-a-large-web-app-project/
Beta Was this translation helpful? Give feedback.
All reactions