### Install PostgreSQL Extensions Source: https://github.com/ajayyy/sponsorblockserver/wiki/Postgres-Extensions Run these SQL commands to create the pgcrypto and pg_trgm extensions in the public schema of your PostgreSQL database. ```sql CREATE EXTENSION pgcrypto SCHEMA public; CREATE EXTENSION pg_trgm SCHEMA public; ``` -------------------------------- ### Load Database into PostgreSQL Source: https://github.com/ajayyy/sponsorblockserver/blob/master/docker/migrate/database.pgload.txt Use this command to load a database file into a PostgreSQL instance. Ensure the PostgreSQL server is running and accessible. The 'quote identifiers' option is used to handle table and column names that might be reserved keywords or contain special characters. ```bash load database from ./database.db into postgresql://sponsorblock:pw@127.0.0.1:5432/sponsorTimes with quote identifiers; ``` -------------------------------- ### Define API Endpoint Client Source: https://github.com/ajayyy/sponsorblockserver/blob/master/test/case_boilerplate.txt Sets up a reusable client function for making POST requests to a specific API endpoint. It initializes the client with the method, URL, and an empty data object. ```javascript import { client } from "../utils/httpClient"; const endpoint = "/api/endpoint"; const postTestEndpoint = () => client({ method: "POST", url: endpoint, data: { } }); ``` -------------------------------- ### Generate Test Users Source: https://github.com/ajayyy/sponsorblockserver/blob/master/test/case_boilerplate.txt Generates a list of users for testing purposes, based on a defined set of cases. It also includes a specific VIP user generation. ```javascript import { genUsers, User } from "../utils/genUser"; const cases = [ "firstCase", "secondCase", "thirdCase" ]; const users = genUsers("endpoint", cases); const vipUser = genUser("endpoint", "vip"); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.