UNPKG

generator-aristos

Version:

create aristos cms fast with yeoman generator.

21 lines 658 B
const fs = require("fs-extra"); const Projects = fs.readJSONSync( "./expansion/upgrade/portfolio-projects/routes/checkers/portfolioModelRoutes.json" ).route; const Project = require(Projects); /* Aristos Logger Path */ const errorAddEvent = require("../../../../../../important/AristosStuff/AristosLogger/AristosLogger") .addError; /** * Counts the projects in the Project collection. * @return {promise} A promise that resolves with the count of the projects */ module.exports = () => { return Project.estimatedDocumentCount({}) .then(c => { return c; }) .catch(err => { errorAddEvent(err, "project query error"); }); };