NodeJS - Yeoman - Generator-Webserver

Usage no npm install needed!

<script type="module">
  import generatorWebserver from '';


💂 Yeoman generator to create NodeJS web server scaffolding using express-js


npm install -g yo
npm install -g generator-webserver


Before running the generator you will need to create a folder for your project where the generator will create all the project files and directories.

Once you have, NodeJS, Yeoman, generator-webserver installed and your project folder created you can run the generator using:

mkdir project
cd project
yo webserver
npm start

Webserver options are:

  • Project name Used for .env
  • Template engine We currently only support nunjucks. Use it if you want frontend in you webserver.
  • PM2 Recommended Production Process Manager for Node.js
  • Database driver We currently support mysql (build with sequelize) | mongodb (build with mongoose)

Scaffolding details

Inside server we can find:

middleware.js Here we can set up our default middlewares like user auth, or whatever. container.js Register everthing inside providers folder using simple-di.

Use providers to inject models (for instance) to our controllers. And avoid bad practices (direct imports inside controllers).


This project is released under the WTFPL LICENSE.