Get suggested counties based on provided query string. Responds with an array, limited to 5 results, of counties where the county name or state matches the provided query string.
- type-ahead suggestions for US counties
- suggestions based on provided fragment of a county name and/or state.
To run the application locally, below applications needs to be installed.
Open Command Prompt/Terminal and execute below commands.
git clone https://github.com/manojsp12/suggest-counties.git
cd suggest-counties
Below properties are configured by default. These properties can be updated here, if required.
# Minimum county length required as input
counties.min-length=3
# Minimum State length required, if State is provided as input
state.min-length=2
# Server port
server.port=3000
mvn spring-boot:run
Application will run by default on port 3000
Configure the port by changing server.port
in application.properties
Application can be tested using Swagger-UI
OpenAPI spec of suggest-counties endpoints can be found here