2.0.0 • Published 2 years ago

json-mongo-model-parser v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

How To Use It

First in first : You need to know how to use mongoDB and mongoose

Method List :

  • getModelsFromDirectory(path)

    This function take a param String that say where is the folder in wich you have your models.

    • Models will be returned as an Object full of Models.
    • If you want to use a specific Model you will need to destructurate the returned Object.

    The path must be relative :
    "/test/models/" -> "./models/"

  • getModelFromFile(path) This function take a param String that say where is the file you want to parse. The path must be relative : "/test/models/user.js" -> "./models/user.js"

Note : (there is no autocompletion for Model Names because of the way there are loaded in the system)

check test folder if you need a better exemple

2.0.0

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago