Open
Description
Migrating the Node.js code to ES6 modules might not only make the code more up-to-date but also streamline the step-by-step tutorials. For example, if we want to add functionality into a Node.js file incrementally, instead of
const service = module.exports = {};
service.someFunction = async () => {
// ...
};
service.anotherFunction = async () => {
// ...
};
we can just do
export async function someFunction() {
// ...
}
export async function anotherFunction() {
// ...
}