env variables through different file and optimizing error handling with middleware

This commit is contained in:
Arjun Patel
2019-01-13 22:38:44 -08:00
parent 43bf237942
commit 23f40dc73b
13 changed files with 111 additions and 119 deletions
+5
View File
@@ -0,0 +1,5 @@
module.exports = (status, message) => {
const error = new Error(message);
error.status = status;
return error;
};