diff --git a/README.md b/README.md index 03d638d1..7bbc618f 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 \ No newline at end of file diff --git a/docs/search-index.md b/docs/search-index.md index 636ce246..919fcd11 100644 --- a/docs/search-index.md +++ b/docs/search-index.md @@ -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: