alex-bezek / cartesia

Server and UI for cartersia
1 stars 0 forks source link

Determine a pattern for sharing code with the frontend and backend #3

Open alex-bezek opened 5 years ago

alex-bezek commented 5 years ago

It would be nice to share code between the frontend and backend. However the frontend bitches about not being allowed to import source code from outside its folder.

It may be possible to add a common folder in the client, and have the server import it, but it feels a bit weird. Its not the end of the world, but if therer is an easy alternative, we could do that.

https://github.com/lerna/lerna is a tool for making multi-package mono-repos. Technically we could do this where the server is its own package, the client is its own, and we have a core package they both import. This would make it a bit nicer that the package.json at the root is just coordinating with the others, and all the server specific stuff would be nested in its own package, but it might be a lot of overhead to deal with