Based on Autumn Framework.
This project aims to initiate a keyword lookingup-and-filtering server as a microservice.
1.Create file /etc/datrie-server.conf
and input some keywords:
<?php
return ['foo', 'bar'];
2.Initiate dependencies:
composer install --no-dev
3.Launch the service:
php index.php
4.Enjoy:
curl -i http://localhost:3028/search-in?message=no+this+foo+bar+kinda+thing
Response:
[
{
"start": 8,
"end": 10
},
{
"start": 12,
"end": 14
}
]