Showing 14 of 14 total issues
Function initialize
has 167 lines of code (exceeds 50 allowed). Consider refactoring. Open
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'
Function init
has 52 lines of code (exceeds 50 allowed). Consider refactoring. Open
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
TODO found Open
Open
appElement.innerHTML += '<p>Received created TODO service event:</p><pre>' + data.title + '</pre>'
- Exclude checks
TODO found Open
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).
- Exclude checks
TODO found Open
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).
- Exclude checks
TODO found Open
Open
title: 'TODO',
- Exclude checks
TODO found Open
Open
appElement.innerHTML += '<p>Unauthenticated call to the TODO service gives this result:</p><pre>' + error + '</pre>'
- Exclude checks
FIXME found Open
Open
// FIXME: this does not allow to declare remote services after the app has been launched
- Exclude checks
TODO found Open
Open
Open the *index.html* file in your browser, you should see a TODO from the service.
- Exclude checks
TODO found Open
Open
var html = '<p>Authenticated call to the TODO service gives this result:</p><ul>'
- Exclude checks
TODO found Open
Open
appElement.innerHTML += '<p>Authenticated call to the TODO service failed with this error:</p><pre>' + error + '</pre>'
- Exclude checks
TODO found Open
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.
- Exclude checks
FIXME found Open
Open
// FIXME: this does not allow to declare remote services after the app has been launched
- Exclude checks
TODO found Open
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.
- Exclude checks