Skip to content

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

Notifications You must be signed in to change notification settings

ushieru/serendipia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

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

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages