Skip to content

Move to ES6 modules #20

Description

@petrbroz

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() {
  // ...
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions