- 6 contraintes
- Client-Server Separation : chacun est indépendent l’un de l’autre, donc chacun peut évoluer comme il le veut
- Stateless : les informations du client ne sont jamais stocké sur le serveur comme ça les requêtes entrantes sont toutes indépendantes
- Cache : la réponse doit dire qu’elle peut être mise en cache comme ça le client, plus tard, peut faire appel à son cache plutôt que le serveur
- Uniform Interface
- identification of resources : la ressource doit être identifiable dans la requête (/todos/1)
- manipulation of resources through representations : dans la réponse du serveur, chaque ressource contient assez d’information pour pouvoir la modifier ou la supprimer (ie: identifiant)
- self-descriptive messages : ???
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // parcourir un fichier csv via un champ d'upload | |
| const formData = await request.formData() | |
| const [diagnostiqueur] = formData.values() as FormDataIterator<File> | |
| if (diagnostiqueur === undefined) { | |
| return new Response("Bulk insert failed", { status: 200 }) | |
| } | |
| const data = (await diagnostiqueur.text()) | |
| .split(/\r\n|\r|\n/) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name test_de_semantique | |
| // @version 2025-10-18 | |
| // @description Création d'un test de sémantique | |
| // @author NerOcrO | |
| // @match http://localhost:3000/* | |
| // @grant none | |
| // ==/UserScript== | |
| ;(function() { | |
| "use strict" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name Vérifier la bonne configuration d'un projet JavaScript | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2024-06-09 | |
| // @description Vérifier la bonne configuration d'un projet JavaScript | |
| // @match https://github.com/inclusion-numerique/* | |
| // @match https://github.com/anct-cnum/* | |
| // @grant GM_xmlhttpRequest | |
| // @connect raw.githubusercontent.com | |
| // ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| // TS v5.2 | |
| // Quelques bases https://github.com/tsconfig/bases#centralized-recommendations-for-tsconfig-bases | |
| // tsconfig.json | |
| { | |
| "compilerOptions": { | |
| // Interop Constraints | |
| // ??? | |
| "esModuleInterop": true, | |
| // ??? |
- Installation
- Documentation
- Projet open source
- what-is-rust-and-why-is-it-so-popular
- rustup est l'équivalent de nvm
cargoéquivaut àyarncargo new [DIRECTORY] --bin
Cargo.tomléquivaut àpackage.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Prettier est inutile sur un projet où il y a eslint | |
| { | |
| "printWidth": 120, // max-len | |
| "tabWidth": 2, // indent | |
| "useTabs": false, // no-tabs | |
| "semi": false, // semi | |
| "singleQuote": true, // quotes | |
| "quoteProps": "as-needed", // quote-props | |
| "jsxSingleQuote": false, // jsx-quotes | |
| "trailingComma": "es5", // comma-dangle |
NewerOlder