chrome-service-backend

command module
v0.0.0-...-0d1d947 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

README

Looking for Navigation and all services configuration?

Follow this link for docs

chrome-service-backend

Source code repository for chrome backend

Requirements

Postgres 14 Go 1.18

Local Testing

  1. There are environment variables that are necessary for the application to start. Please copy the contents within env.example and move them over to a new .env file at the root of your local app directory. There, set the values of the variables accordingly for your local db configuration. This repo also supports docker-compose up for its postgres server and make infra to run all needed containers. An example .env for this would look like:
PGSQL_USER=chrome
PGSQL_PASSWORD=chrome
PGSQL_HOSTNAME=0.0.0.0
PGSQL_PORT=5432
PGSQL_DATABASE=postgres
  1. Run the server by using go run . or go run main.go
  2. To test the service, at the moment, you are able to hit the following endpoint:
GET http://localhost:8000/health
GET http://localhost:8000/api/chrome-service/v1/hello-world
Headers

To query any endpoint, you will need a x-rh-identity header in your request.

You can use this value as an example:

eyJpZGVudGl0eSI6eyJ1c2VyIjp7InVzZXJfaWQiOiIxMiJ9fX0=
Helpful Make targets

make database will start a podman database, you need to fill out the .env file first as detailed above.

make clean will tear down the database.

make dev run the service

make infra will create the db and kafka locally

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL