pulsar-db
v1.0.0
Published
PulsarDB est une bibliothèque Angular qui propose un intercepteur HTTP, simulant des opérations CRUD sur une base de données locale via `localStorage`. Elle intercepte les requêtes HTTP, redirigeant vers des "tables" fictives, facilitant ainsi le développ
Downloads
16
Readme
PulsarDB
PulsarDB est une bibliothèque Angular qui propose un intercepteur HTTP, simulant des opérations CRUD sur une base de
données locale via localStorage
. Elle intercepte les requêtes HTTP, redirigeant vers des "tables" fictives, facilitant
ainsi le développement en l'absence d'un backend. Chaque table est un élément dans localStorage
, et les opérations
sont déterminées par l'URL et la méthode HTTP. C'est un outil pratique pour le développement, mais non recommandé en
production.
Comment l'utiliser
$> npm i pulsar-db
Dans votre fichier app.module.ts
, ajoutez ce provider :
providers: [
{
provide: HTTP_INTERCEPTORS,
useClass: PulsarDBInterceptor,
multi: true
}],