No description
  • Go 79.4%
  • Dockerfile 12.6%
  • Makefile 5.7%
  • HCL 2.3%
Find a file
oss-core-libraries-dashboard[bot] 9d55141661
[COMPLIANCE] Update Copyright and License Headers (#6)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2026-02-20 15:30:59 +05:30
.github Update GHA workflows to use secure versions. 2023-09-22 09:41:42 -04:00
__wp_project__apis [COMPLIANCE] Update Copyright and License Headers (#6) 2026-02-20 15:30:59 +05:30
cmd/__wp_project__-api [COMPLIANCE] Update Copyright and License Headers (#6) 2026-02-20 15:30:59 +05:30
config [COMPLIANCE] Update Copyright and License Headers (#6) 2026-02-20 15:30:59 +05:30
gen/proto/go/__wp_project__/v1 init: Go protobuf API template app. 2023-06-02 13:48:23 -04:00
server [COMPLIANCE] Update Copyright and License Headers (#6) 2026-02-20 15:30:59 +05:30
.gitignore Initial commit 2023-06-02 13:33:01 -04:00
buf.gen.yaml [COMPLIANCE] Update Copyright and License Headers (#6) 2026-02-20 15:30:59 +05:30
buf.work.yaml [COMPLIANCE] Update Copyright and License Headers (#6) 2026-02-20 15:30:59 +05:30
Dockerfile [COMPLIANCE] Update Copyright and License Headers (#6) 2026-02-20 15:30:59 +05:30
go.mod db: Move DB connection to separate RPC. 2023-06-05 10:12:04 -04:00
go.sum go: Update go.sum. 2023-06-09 16:13:58 -04:00
LICENSE [COMPLIANCE] Update Copyright and License Headers (#6) 2026-02-20 15:30:59 +05:30
Makefile init: Go protobuf API template app. 2023-06-02 13:48:23 -04:00
README.md init: Go protobuf API template app. 2023-06-02 13:48:23 -04:00

%%wp_project%%

First clone

Run make start to download go modules and regenerate protobufs.

Local testing

Start your server with make serve

$ make serve

go run cmd/%%wp_project%%-api/main.go config/config_local.hcl
starting %%wp_project%%.......
2022/12/02 20:58:46 Serving on "localhost:8080"

Then send a request via grpcurl:

$ grpcurl -plaintext -d '{"message": "hello from local development"}' localhost:8080 %%wp_project%%.v1.%%Wp_project%%Service/HelloWorld

{
  "configMessage": "hello from %%wp_project%%",
  "requestMessage": "hello from local development",
  "now": "2022-12-03T02:01:19.505743Z"
}

Database Connectivity

This application connects to a Postgres database. The app will use the following environment variables for configuration on how to connect to Postgres:

  • DATABASE_HOSTNAME
  • DATABASE_PORT
  • DATABASE_NAME
  • DATABASE_USERNAME
  • DATABASE_PASSWORD