コードをチェックアウトし、端末を開き、ディレクトリに移動します。 Windowsユーザー向けガイド
docker build . -t alexandria-api
docker container run --name alexandria-api -p 8080:80 -p 8081:81 -v ${PWD}:/alexandria-api -it -d alexandria-api
docker exec -it alexandria-api /bin/bash
/alexandria-api/scripts/init-docker.sh
http://127.0.0.1:8080にアクセスして、開発を開始します。
http://127.0.0.1:8081にアクセスして、データベースにアクセスして編集します。
テストの実行:
./phpunit --bootstrap functions.php tests
## API Endpoints
### Search
https://api.alexandria.org/?q=test%20query&p=1&a = 1&c=a
Parameters:
Q:クエリP:ページ番号1〜10 A:匿名フラグ、匿名検索のデフォルト動作1の場合は0。 C:クラスター(AまたはB)
Response:
{"status": "success"、 "time_ms":535.438060760498、 "total_found":105245、 "page_max":10、 "result":[{"url": "https://github.com/"、 "" title ":" github "、" snipt ":" " 「スコア」:32.5283701133728、 "domain_hash": "5468486186948888880458"、 "url_hash": "5468481278583313044"、 "excef_match":0、 "":2、 "" "is_subdomain":0、 "domain": "github.com"、 "display_url": "https://github.com/dannote/recattle"}]}
### Query URL
https://api.alexandria.org/url?u=http://example.com&c=a
Parameters:
U:クラスターC:クラスター(AまたはB)にあるかどうかを確認するURL
Response:
{"status": "success"、 "result": "... tsv data ..."}