This project are built by Practice develop a cache and relationship database
- Node.js
- yarn (optional)
$ cd ${project}
$ yarn install
$ yarn install
$ yarn run build
$ yarn start
$ yarn install
$ yarn run dev
$ yarn install
$ yarn test
- Get data from API
- Create memory base cache
- Create model
- Hiding information in model instance
- Create model relationship
- Create file base cache
- Remove expired data in cache
- setup eslint
- add coverage
- add index feature at model for optimizing search (use tree datastructure got data), now use full searching when searching name
- model getItems, getItem multiple param filter
- FUNCTIONS
- get(key) : get data from Cache
- set(key, data) : set data to Cache Storage
- clear : clear all storage
- all : return all data in storage
-
ATTRIBUTES
- path
- loaded
- delimiter
- writeStream
-
FUNCTIONS
- load : read data from file
- FUNCTIONS
- getItems : return JSON list from API or cache
- getItem : return JSON object from API or cache
- hasMany : 1: N relationship function
- belongTo : N: 1 relationship function
- associated : relationships are declared function
- build : return model instance
- ATTRIBUTES
- primary : model primary key
- model_name : api path name related API
- fields : included fields in model
- axios
- jest
- babel
- nodemon