Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 1.1 KB

File metadata and controls

25 lines (19 loc) · 1.1 KB

Running the PiSearch API

Wherever you're running the PiSearch API (from a dev PC through to production), you'll need to get the following set up beforehand . . .

PiSearch DB

The PiSearch DB is in MySQL.
The schema in in schema.sql under the API project.
The connection string must be made available as configuration to the API, see appsettings.json for an example.

For local dev, you can start mysql with:

docker run -d -e MYSQL_ROOT_PASSWORD=wow_much_security -p 3306:3306 mysql

Digits, Suffix Array & Precomputed Results

The API needs data to serve . . .

You are welcome to use your own data (for any digits, not just Pi). All of the required data files can be generated by StringSearchConsole.exe.
TODO: document this process.

If you just want to serve the same data as the live API though, it can be downloaded from TODO

(Optional): Logs DB

The API uses Serilog, and has the MySQL sink installed.
If you want to make use of this, make an empty database and enter the connection string into your appsettings.{Environment Name}.json. See appsettings.json for an example.