kalisio/feathers-distributed

View on GitHub

Showing 14 of 14 total issues

Function initialize has 167 lines of code (exceeds 50 allowed). Consider refactoring.
Open

export async function initialize (app) {
  debug('Initializing cote with options', app.coteOptions)
  // Setup cote with options
  app.cote = makeCote(app.coteOptions)
  app.distributionKey = app.distributionOptions.key || 'default'
Severity: Major
Found in lib/index.js - About 5 hrs to fix

    Function init has 52 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    export default function init (options = {}) {
      return function (app) {
        // We need to uniquely identify the app to avoid infinite loop by registering our own services
        app.uuid = uuid()
        // For display purpose
    Severity: Major
    Found in lib/index.js - About 1 hr to fix

      TODO found
      Open

            appElement.innerHTML += '<p>Received created TODO service event:</p><pre>' + data.title + '</pre>'
      Severity: Minor
      Found in example/index.html by fixme

      TODO found
      Open

      This launches a gateway and two replicas of the microservice. Wait a couple of seconds so that each app is aware of other apps on the network, then open the *example/index.html* file in your browser. If you refresh it regularly, you should see a TODO coming from a different microservice in a random way (i.e. its ID should be different sometimes).
      Severity: Minor
      Found in README.md by fixme

      TODO found
      Open

      This launches a gateway ( `gateway` Docker service) and two replicas of the microservice (`service1` and `service2` Docker services). If you open the *example/index.html* file in your browser, then refresh it regularly, you should also see a TODO coming from a different microservice in a random way (i.e. its ID should be different sometimes).
      Severity: Minor
      Found in README.md by fixme

      TODO found
      Open

              title: 'TODO',
      Severity: Minor
      Found in example/service/src/services/index.js by fixme

      TODO found
      Open

            appElement.innerHTML += '<p>Unauthenticated call to the TODO service gives this result:</p><pre>' + error + '</pre>'
      Severity: Minor
      Found in example/index.html by fixme

      FIXME found
      Open

      // FIXME: this does not allow to declare remote services after the app has been launched
      Severity: Minor
      Found in example/service/src/app.js by fixme

      TODO found
      Open

      Open the *index.html* file in your browser, you should see a TODO from the service.
      Severity: Minor
      Found in example/README.md by fixme

      TODO found
      Open

              var html = '<p>Authenticated call to the TODO service gives this result:</p><ul>'
      Severity: Minor
      Found in example/index.html by fixme

      TODO found
      Open

              appElement.innerHTML += '<p>Authenticated call to the TODO service failed with this error:</p><pre>' + error + '</pre>'
      Severity: Minor
      Found in example/index.html by fixme

      TODO found
      Open

      You can then try to kill one of the service replicas, e.g. `docker-compose stop service1`. Now if you refresh the page regularly you should always see the same TODO as the failed service should not be contacted anymore.
      Severity: Minor
      Found in README.md by fixme

      FIXME found
      Open

      // FIXME: this does not allow to declare remote services after the app has been launched
      Severity: Minor
      Found in example/gateway/src/app.js by fixme

      TODO found
      Open

      If you kill the latest service replica, e.g. `docker-compose stop service2`, you should see a timeout on refresh. Then if you restart the service, e.g. `docker-compose start service2`, the TODO should come back on refresh.
      Severity: Minor
      Found in README.md by fixme
      Severity
      Category
      Status
      Source
      Language