The API element of the new Tabroom.com 4.0.
Caution
This is a prerelease version of the new api. This api is not live currently and even when it is released in beta, no guarantees are made to the stability or availability of the endpoints.
For information related to the sister project, the Tabroom.com frontend re-write, see the schemats project.
for information on the project structure and norms see the project docs
git clone https://github.com/speechanddebate/indexcards.git
cd indexcards
npm installCopy the sample config and then update database + environment values for your machine:
cp config/config.js.sample config/config.jsAt minimum, make sure your local values for development and test DB settings are correct in config/config.js.
Create a MariaDB/MySQL database (for example tabtest) and import tests/test.sql:
mysql -u <user> -p -e "CREATE DATABASE IF NOT EXISTS tabtest;"
mysql -u <user> -p tabtest < tests/test.sqlThen run tests with the test environment:
npm run testStart the server:
npm run devOpen the API reference (Scalar) at:
http://<HOST>:<PORT>/v1/reference
Note
You will likely need to be 'logged in' for certain endpoints. You should be able to register a user and login with the auth endpoints in the scalar UI. the login endpoint will return a token that you will then need to send as a bearer token.