# 1.1 快速开始

为了让大家快速了解 Jupiter 框架,我们提供了大量的 example (opens new window) 以及标准化的项目模版 jupiter-layout (opens new window)

在这一节,我们将通过 jupiter-layout 向大家演示如何基于 Jupiter 快速搭建并启动一个项目。

# 1.1.1 安装依赖

# 安装 Golang (opens new window)

Jupiter 是基于 Golang 开发的,所以在开始之前,你需要先安装 Golang 环境。

# 安装 Jupiter 脚手架

go install github.com/douyu/jupiter/cmd/jupiter@latest
1

# 1.1.2 创建项目

# 创建项目

jupiter new jupiter-layout-demo
1

# 进入项目

cd jupiter-layout-demo
1

# 1.1.3 启动项目

# 启动依赖中间件

docker-compose -f deployment/docker-compose.yml up -d
1

# 启动项目

jupiter run -c config/exampleserver/local-live.toml
1

# 测试接口

  • HTTP
curl "localhost:9527?name=bob"
1
{"error":0,"msg":"请求正常","data":{"message":"hello wolrd"}}
1

# Jaeger Admin

open http://localhost:16686/search (opens new window) to checkout opentelemtry trace data.

Jaeger