Skip to content

Instantly share code, notes, and snippets.

@iamgoangle
Created June 10, 2017 12:22
Show Gist options
  • Select an option

  • Save iamgoangle/92ccd0d46537f8314ff50dbc0b8d01d8 to your computer and use it in GitHub Desktop.

Select an option

Save iamgoangle/92ccd0d46537f8314ff50dbc0b8d01d8 to your computer and use it in GitHub Desktop.
db.js
const path = require('path');
let mockFile = (schema) => {
return require(path.join(__dirname, 'mock/', schema));
};
module.exports = () => {
return {
customers: mockFile('customers.js'),
products: mockFile('products.js')
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment