REST API
DearDiary.APIConfig — TypeAPIConfigA struct to hold the configuration for the API server.
Fields
host::String: The host of the API server.port::UInt16: The port of the API server.db_file::String: The path to the SQLite database file.jwt_secret::String: The JWT secret for authentication.enable_auth::Bool: Whether to enable authentication or not.
DearDiary.run — Functionrun(; env_file::String=".env")Starts the server.
By default, the server will run on 127.0.0.1:9000. You can change both the host and port by modifying the .env file specific entries. The environment variables are loaded from the .env file by default. You can change the file path by passing the env_file argument.
DearDiary.stop — Functionstop()Stops the server. Alias for Oxygen.Core.terminate().