sundowndev / interview-v6

another job interview (anonymous enterprise; It's an MVP!)

Home Page:https://sundowndev.github.io/interview-v6

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

interview-v6

Build Status

Objectif

Implémenter et déployer une API REST qui justifie un texte passé en paramètre.

Contraintes

  • La longueur des lignes du texte justifié doit être de 80 caractères.

  • L’endpoint doit être de la forme /api/justify et doit retourner un texte justifié suite à une requête POST avec un body de Content-Type: text/plain.

  • L’api doit utiliser un mécanisme d’authentification via token unique. En utilisant par exemple une endpoint api/token qui retourne un token d’une requête POST avec un json body {"email": "foo@bar.com"}.

  • Il doit y avoir un rate limit par token pour l’endpoint /api/justify, fixé à 80 000 mots par jour, si il y en a plus dans la journée il faut alors renvoyer une erreur 402 Payment Required.

  • Le code doit être déployé sur un url ou une ip public

  • Le code doit être rendu sur github

  • Langage : Nodejs

  • PAS d’usage de bibliothèque externe pour la justification

Bonus

  • Les tests, le coverage

  • La lisibilité

About

another job interview (anonymous enterprise; It's an MVP!)

https://sundowndev.github.io/interview-v6


Languages

Language:TypeScript 96.1%Language:JavaScript 2.5%Language:Dockerfile 1.4%