Welcome to Justife For All, the one and only API for justifying all your text. Throw plain text, receive justification !
The base URL for all API endpoints is https://tictactrip.whiterqbbit.io/
-
Root Endpoint (
/
):A
GET
request to this endpoint returns a nice emoji. Not much about it. -
Token Endpoint (
/token
):A
POST
request with a JSON body containing an email field to this endpoint will return a token. Doc for this endpoint here. -
Justify Endpoint (
/justify
):A
POST
request with a body of ContentTypetext/plain
will returns justified text. Doc for this endpoint here.
To set up and run this project locally, follow the below steps:
-
Clone the repository to your local machine:
git clone https://github.com/whiterqbbit/tictactrip_test
-
Fill in the environment variables in
.env
file:JWT_SECRET=your_secret DATABASE_URL=your_database_url
-
Use Docker to run the project:
docker-compose up
-
Setup your pre-commit hook if needed in
.git/hooks/pre-commit
:#!/bin/sh export PATH="path/to/pnpm:$PATH" export PATH="path/to/node:$PATH" pnpm pre-commit