Skip to content

speechanddebate/indexcards

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

767 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

indexcards

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

Getting setup

1) Clone and install

git clone https://github.com/speechanddebate/indexcards.git
cd indexcards
npm install

2) Create config/config.js

Copy the sample config and then update database + environment values for your machine:

cp config/config.js.sample config/config.js

At minimum, make sure your local values for development and test DB settings are correct in config/config.js.

3) Create and load the test database

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.sql

Then run tests with the test environment:

npm run test

4) Run the API and open Scalar

Start the server:

npm run dev

Open 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.

About

Tabroom.com NodeJS API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages