Skip to content
Mehmet Sefa edited this page Jan 23, 2020 · 1 revision

Welcome to the santral wiki!

Flow

program starts

  • Santral gets module data from environment and saves to AppState

  • Starts web server with routes for each module

first request comes

  • Santral sends request to related module:
{
    "version": "3",
    "action": "api",
    "params": {
    	"storefrontId": 5
    },
    "api": {
    	"base": "/info",
    	"endpoint": "/name/:name/age"
    }
}
  • gets module configuration:
{
  "__upgrade__version": {
    "version": "jhdsuunalsdfaosiuydf23kh4u234ulklsdf",
    "api": {
      "/info": {
        "/name/:name/age": {
          "params": {
            "name": "string",
            "language": "string"
          },
          "mapper": {
            "name": "path",
            "language": "query"
          }
        }
      }
    },
    "fragment": {
      "path": "/product/:id/description",
      "params": {
        "name": "string",
        "language": "string"
      },
      "mapper": {
        "name": "path",
        "language": [
          "query",
          "config"
        ]
      }
    }
  }
}
Clone this wiki locally