Giter Club home page Giter Club logo

plurimos's Introduction

plurimos

Many-to-one by $app_author$ - apping, based on go_echo-microservices-seed.g8.

Copyright (C) by apping.

Latest release version: $app_version$. See RELEASE-NOTES.md.

Getting Started

Application Bootstrapper & API Handlers

Implement application bootstrapper by implementing interface goems.IBootstrapper.

API handler is defined as

type IApiHandler func(*ApiContext, *ApiAuth, *ApiParams) *ApiResult`

See samples for example of bootstrapper and API handler.

Configurations

Default application configuration file is config/application.conf, override default value via env APP_CONFIG. Configurations are in HOCON format.

Important configurations:

Application information

app {
  name: "Application's name"
  shortname: "Application's short name, e.g. goems"
  version: "Application's version string, e.g. 1.0.0"
  desc: "Application's description, e.g. Caching services with RESTful APIs"
}

API settings

api {
  http {
    # Listen address & port for HTTP/REST API gateway.
    # set listen_port=0 to disable HTTP/REST API gateway.
    listen_addr = "0.0.0.0"
    listen_port = 8080

    # Name of HTTP header that holds "application id" info passed from client.
    header_app_id = "X-App-Id"

    # Name of HTTP header that holds "access token" info passed from client.
    # override this setting with env HTTP_HEADER_ACCESS_TOKEN
    header_access_token = "X-Access-Token"
  }

  grpc {
    # Listen address & port for gRPC API gateway.
    # set listen_port=0 to disable gRPC API gateway.
    listen_addr = "0.0.0.0"
    listen_port = 8090
  }

  # Client cannot send request that exceeds this size
  # - absolute number: size in bytes
  # - or, number+suffix: https://github.com/lightbend/config/blob/master/HOCON.md#size-in-bytes-format
  max_request_size = 64KiB

  # Timeout to parse request data
  # - absolute number: time in milliseconds
  # - or, number+suffix: https://github.com/lightbend/config/blob/master/HOCON.md#duration-format
  # override this setting with env API_REQUEST_TIMEOUT
  request_timeout = 10s
}

REST Endpoints

api {
  http {
    # API HTTP endpoints
    endpoints {
      # format: {url={http-method=handler-name}}
      "/info" {
        get = "info"
      }
      "/echo/:id" {
        get    = "echo"
        post   = "echo"
        put    = "echo"
        delete = "echo"
      }
    }
  }
}

LICENSE & COPYRIGHT

See LICENSE.md.

plurimos's People

Contributors

btnguyen2k avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.