0.0.43 • Published 5 months ago

@commoners/local-services v0.0.43

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

@commoners/local-services

Connect to shared services (exposed via commoners share) available on your local network on desktop.

Arguments

  • isValid - A function that returns whether or not a service should be connected to ((ip, env) => boolean)

    • ip - The IP address of the service (localhost if the current machine)
    • env - The service's environment variables
  • port - The port to use for the service gateway (number)

    • Optional if you have a COMMONERS_SHARE_PORT environment variable

Example

import localServicesPlugin from '@commoners/local-services'

export default {
    plugins: [
        localServicesPlugin((ip, env) => {
                if (ip === 'localhost') return true
                return env.SECRET_KEY === '****************'
            }, 3768)
    ]
}

With the above configuration, you would be able to discover shared services on your local machine by running commoners share --port 3768.

0.0.42

5 months ago

0.0.43

5 months ago

0.0.38

5 months ago

0.0.31

6 months ago

0.0.28

7 months ago

0.0.25

7 months ago

0.0.2

7 months ago

0.0.1

7 months ago

0.0.0

7 months ago