npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

generator-wilbur

v0.0.7

Published

Yeoman generator to quick-start NodeJS + ExpressJS+ MongoDB application development with loads of features (written in TypeScript 3.x)

Downloads

49

Readme

wilbur-generator

Yeoman generator to quickstart NodeJS + ExpressJS + MongoDB application development (written in TypeScript 3.x)

wilbur allows you to easily define an application and its associated typescript classes and in return you get a full featured NodeJS application server. It is intended to be used with its dedicated desktop application (coming soon).

By simply defining a class (class name, its member variables and their types & constraints, etc) you are provided with the code for a TypeScript class with strong field validation which by default interfaces with MongoDB, a MongoDB service, request controllers/validators/routers, and Swagger documentation. You get all of these features from writing absolutely zero code.

Features

When you generate an app with wilbur you will enjoy a fully features api server without having to write a single line of code Features include:

Prerequisites

Installation

$ npm install -g generator-wilbur

or

$ yarn install -g generator-wilbur

Highly Recomennded - install the desktop client

Without using the desktop client, you will be limited only to using the boilerplate generator. The desktop app will allow you to create configuration files that will allow you to define applications & classes, add classes to your app after you've generated it, and remove classes from your app after you've generated it.

Generators

Available generators:

Available flags:

install --> will install dependencies with npm post app generation

$ yo wilbur --install
$ yo wilbur:boilerplate --install

yarn-install --> will install dependencies with yarn post app generation

$ yo wilbur --yarn-install
$ yo wilbur:boilerplate --yarn install

help --> will display instructions for available generators

$ yo wilbur --help

Usage

Use with Desktop application

When using the generator with the dedicated desktop application, there is no more use for running the generator in the terminal. The desktop client takes care of everything for you. It is highly reccomended to use the generator with the desktop application.

Generate a boilerplate app

You can generate a boilerplate app with absolutely no configuration in just seconds. Included in the boilerplate app is a simple TodoItem class which demonstrates features like the MongoDB interface with TypeScript classes, strong request validation, GET/PUT/POST/DELETE HTTP endpoints, and Interactive Swagger documentation.

$ yo wilbur:boilerplate

Use the --install or --yarn-install flags to install the dependencies for your app post gneration.

Generate a defined app

Generate a defined app by supplying the generator with an app configuration file (generated by desktop client). This app configuration file contains information about your app and its typescript classes. Be sure to have this file handy when running the app generator.

$ yo wilbur:boilerplate

Use the --install or --yarn-install flags to install the dependencies for your app post gneration.

Generate a class

Generate a defined class by supplying the generator with a class configuration file (generated by desktop client). This app configuration file contains information about your class to be generated. Be sure to have this file handy when running the class generator.

$ yo wilbur:add-class

Note : This generator must be ran in the directory of an existing application generated by wilbur.

Remove a class

Removed a defined class by running this generator in the directory of an existing application generated by wilbur. After running this generator, you'll be provided with a list of classes that you've already generated using wilbur and selecting a class will remove all files and references to those files from the filesystem. Warning : deleting these files cannot be undone.

$ yo wilbur:remove-class

Note : This generator must be ran in the directory of an existing application generated by wilbur.

Running the app

Run MongoDB server

$ mongod

NPM Run/Build Tasks

Task automation is based on NPM scripts.

Task | Description --------------------------------|--------------------------------------------------------------------------------------- npm run serve | Run dev server with hot reloads npm start | Build the app and run on build completion npm run start:server | Run server without building the app npm test | Run unit tests via Mocha npm run test:watch | Run unit tests in watch mode npm run test:report | Generate unit test report using Mochawesome npm run test:coverage | Generate unit test coverage report using Istanbul npm run compile:env | Build project for specified environment

Resources

Inspiration

License

MIT © Alex Batis