e-commercee
Version:
This package contains a backend of what would be the logic of a e-commercee software, the architecture used is made in 3 layers
33 lines (27 loc) • 412 B
JavaScript
;
let collection;
let cursor;
let db;
function loadCollection() {
if (!collection) {
collection = require('./collection');
}
return collection;
}
function loadCursor() {
if (!cursor) {
cursor = require('./cursor');
}
return cursor;
}
function loadDb() {
if (!db) {
db = require('./db');
}
return db;
}
module.exports = {
loadCollection,
loadCursor,
loadDb
};