This project is a test for an intership at Tictactrip
This is a small API that allow a user to justify a text per line of 80 characters
The email must be unique
There is a limit of 80.000 words per day
The user first need to get an authentication token from the authentication endpoint
Use npm to install
npm install
Start local server
npm run start
Launch test
npm test
The API can be access with this URL : https://test-tictactrip.onrender.com
This endpoint allows you to retrieve a token which will be used to authorize you when you call the justify endpoint justify
POST /api/token
Content-Type: application/json
{
"email": "your email"
}
{
"token": "your token"
}
This endpoint allows you to justify a text per line of 80 characters
POST /api/justify
Content-Type: text/plain
Authorization: Bearer your-token-here
your text
your text