generator-seqexpress

Generator for express architectures with sequelize. Developed at BeerealIT

Usage no npm install needed!

<script type="module">
  import generatorSeqexpress from 'https://cdn.skypack.dev/generator-seqexpress';
</script>

README

Boilerplate code generator for a layer architecture using sequelize and express libraries in nodeJS with Typescript.

1 - Install yeoman (npm install yo -g)

2 - Install the generator with npm install generator-seqexpress -g

3 - In the root folder of the project where you want you files generated run: yo seqexpress

Possible Configurations when executed

  • Generate a service file -> This is a file that sits between the controller and the repository, it should manage any additional calls or connection with other services that the logic requires

  • Generate Controller file -> This is the controller, it has the methods that will be referenced by the router, it takes care of decompsing the requests and forming the responses

  • Generate Router -> It takes care of the routing for the model provided, building specfic endpoints for each of the functionalities

  • ErrorHelperVersion -> This version of the files has an errorHandler for each of the error clauses, it provides more specific error reporting, it uses the winston library for the console outputs

  • Create Logger -> Creates the logger used by the errorHelper

  • QueryHelper -> Small Helper that process information from sequelize and provides the calculation for the page offset used for pagination queries

This generator was developed by Julián Spinelli in BeerealIt