Skip to content

Timandes/datrie-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DA-Trie Service

Based on Autumn Framework.

This project aims to initiate a keyword lookingup-and-filtering server as a microservice.

Installation

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
    }
]

Extra Dependencies

See