Skip to content

Commit

Permalink
docs: Update docs on generating search index
Browse files Browse the repository at this point in the history
  • Loading branch information
gkarat committed Jun 19, 2024
1 parent 75be06a commit 1a1f182
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
30 changes: 18 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,23 @@ 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
```

```
PGSQL_USER=chrome
PGSQL_PASSWORD=chrome
PGSQL_HOSTNAME=0.0.0.0
PGSQL_PORT=5432
PGSQL_DATABASE=postgres
```
2. Run the server by using `go run .` or `go run main.go`
3. 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
```
```
GET http://localhost:8000/health
GET http://localhost:8000/api/chrome-service/v1/hello-world
```
### Headers
Expand All @@ -44,6 +48,8 @@ eyJpZGVudGl0eSI6eyJ1c2VyIjp7InVzZXJfaWQiOiIxMiJ9fX0=
`make clean` will tear down the database.
`make dev` run the service
`make dev` will run the service
`make infra` will create the db and kafka locally
`make generate-search-index` will generate search index file
7 changes: 7 additions & 0 deletions docs/search-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ The final custom section can look similar to this:
}
```

## Generating search index

To generate the search index follow these steps:

1. Make sure the correct files were changed. If you are changing navigation files, make sure to edit both stage and production files.
2. Run the `make generate-search-index` command from the project root

## Publishing search index

To publish the search index follow these steps:
Expand Down

0 comments on commit 1a1f182

Please sign in to comment.