ABOUT PR
This PR gives users the ability to register as farmers or as customers/consumers.
RELEVANT FILES
auth.js
ISSUE
$Issue_Number
Classes should be defined and implemented in the following format:
Generally
export class SomeClass {
someFunction() {
console.log("This is some function. Some function I tell thee.");
}
}
Controller Classes
export class SomeControllerClass {
static async someControllerFunction() {
try {
console.log("O thou elusive one, be not confounded by this mystery for it is made clear by the forces that this be nothing other than a controller function.");
} catch (error) {
console.log("Ah! Your request was plunged into the deep blue sea where Davy Jones would make a caricature of it but fear not my brave one, for thou mayest try again.");
}
}
}
NB:
async
(i.e Promises within a controller function would be resolved using await
)Doth thou comprehend soldier?
// function.js
export default () => {
console.log("I am a lonely function. Care to cuddle me to happiness?");
};
index.js
file within that folder so they can be imported elsewhere from the root (the containing folder). Example below// folder > file1.js
export class File1Class {
}
// folder > file2.js
export class File2Class {
}
// folder > index.js
export * from "./file1";
export * from "./file2";
// anotherfolder > file.js
import { File1Class, File2Class } from "../folder";
API responses should be in the following format:
res.status(200).json({
statusCode: 200,
response: "Hello Earth!"
});
console.log("Let's work magic together. Wave your wands buddies and may the force be with us.");