Skip to content

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serendipia

Serendipia

Serendipia is a simple RESTful (Representational State Transfer) gateway service for the purpose of discovery, load balancing and failover.

Documentation

Quickstart

$ serendipia

How works?

Register MicroService

// Express example
import express from 'express'
import axios from 'axios';

// ... [code]

app.listen(0, function () {
    const port = this.address().port
    const register = () => axios.post('http://127.0.0.1:3000/services', {
            service_name: "example_service",
            service_port: port.toString()
        });

    // Register microservice 
    register()
    // Update microservice 
    setInterval(register, 4000)

    console.log(`Server run: http://localhost:${port}/`)
})

Now you only need make a request with this rules:

[SerendipiaServer]/[MicroServiceName]/[MicroServicePath]

In progress

  • Version support

About

Simple RESTful (Representational State Transfer) gateway service for the purpose of discovery, load balancing and failover.

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages