Microservices
Best Practices

Best practices

For writing microservices, we recommend:

  1. Refer to the API best practices for making API calls here. These all apply to microservices as well.
  2. Use a code editor with language extensions installed (like VS Code).
  3. Use the debugger built into your code editor to confirm what is happening during execution.
  4. Leave detailed comments in your code.
  5. Plan out what the service will do step by step before writing code.
  6. Read up on general JavaScript best practices before you start.
  7. Once your code is confirmed to work, go back over it and look for ways you can simplify it and remove any code left over from earlier iterations.
  8. Write tests for each function using Jest.
  9. If you have experience with code, we also recommend using Typescript for microservices.
;