Sharing code between multiple apps with shared database

I just watched this video about creating two separate apps: https://www.youtube.com/watch?v=aYIK_ClHLZo

Another time you might do it is with a Mobile and Web app. My question is how can you share code between the two projects? (schemas for example)
Would symlinks work for this?

Take a look at Meteor Git Repo and symlinks which discusses basically the same thing :smile:

Thanks. I actually posted an answer in that thread :slight_smile:

Sharing of the packages I get using PACKAGES_DIR, but I’m a little more confused about sharing code that isn’t in packages. I don’t feel like packaging up my code right now.

Basically, running two apps that share code using symlinks works for me, but what happens when I deploy? Will the symlinks still work? I suppose at this point I should just try it already! (And sorry if this was answered in the post you linked to and I just didn’t understand)

Oh, sorry I missed that on the other thread.

I think you should be fine since what the build process does is basically read your directory structure and files to compile them into another structure. So as long as it runs, it can build as well.

Although, I’d still recommend a package structure for portability and sanity :smile:

1 Like