Skip to content

How to share common classes between server and client? #7

Description

@tiagolr

Hi, the way I'm organizing i like to have multiple folders inside src directory.

  • src
    • client
    • server
    • shared

The trouble is how to share classes between server and client (example interfaces), the way i found is to add "server" and "client" packages to the files.

It has the disadvantage that its possible to import client package files into server and vice versa, for now I'm using a small check like #if client error #end on server package files.

Is there a more elegant solution for this? Thank you very much.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions