/hello-node

Simple server for test

Primary LanguageTypeScript

hello-node

Simple server for test

Commands

$ make help
Usage: 

 build    build the application
 run      run the application(card)
 test     run tests
 lint     check everything's okay
 format   format files
 help     prints this help message

APIs

GET /

πŸ‘‹ Hello there?

GET /v1/time

{
  "timestamp": 1592404155,
  "timestamp_ms": 1592404155293,
  "time_human": "2020-06-17T23:29:15.293000000+00:00"
}

GET /v1/msa

Micro service κ°„ Tracing 을 μ²΄ν¬ν•˜κΈ° μœ„ν•΄ μ‚¬μš©ν•˜λ©΄ 쒋을 Endpoint.
Related ENV

  • TARGET_HOST: Endpoint λ‚΄μ—μ„œ API μš”μ²­μ„ 보낼 target server host
  • HEADER_PREFIXES_FOR_PROPAGATION: TARGET_HOST 에 API μš”μ²­μ„ 보낼 λ•Œ ν•¨κ»˜ 전달 ν•  header prefix. , 둜 λΆ„λ¦¬ν•˜μ—¬ μ—¬λŸ¬κ°œλ₯Ό 넣을 수 μžˆλ‹€.
  • DELAY_MS_BETWEEN_REQUEST_TO_TARGET: target server 에 μš”μ²­μ„ 보내기 μ „/ν›„λ‘œ κ°€μ§ˆ delay

TARGET_HOST μ—­μ‹œ hello-node 이어야 μ•„λž˜μ²˜λŸΌ κΉ”λ”ν•˜κ²Œ 떨어진닀.

{
  "name": "RootServiceName",
  "headers": { "headers_from": "request" },
  "history": [
    { "name":  "RootServiceName", "headers": { "headers_from": "request" } },
    { "name":  "TargetServiceName", "headers":  {} },
  ]
}