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

@umberware/the-way

v1.0.0-beta.3.7.5

Published

TheWay is a framework to enhance the development with NodeJs and Typescript, promoting agility, simplicity and intelligibility

Downloads

15

Readme

Site Documentation Changelog Examples License EsLint Build Status Coverage Sponsor Follow Discord

Note: The release 1.0.0 will occur soon!

Summary

Features

Using TheWay, you can easily and simply define REST operations, inject instances of a class, automatically configure and destroy instances, override classes to define a custom behavior, enable/disable features, and much more. The proposal of TheWay is to enhance the life cycle of the development in Node.js with a lot of features. The main features are:

  • Class Injection & Singleton: When the @Inject decorator is used, a dependency will be registered, and the Core will instantiate this dependency (as singleton) and inject at the injection point
  • REST Operations & Concepts: With the Rest Decorators, you can create REST operations with intelligibility, security and conciseness
  • HTTP and HTTPS server: We use the express to build a http and / or https server, and you can customize some properties for this server
  • Configurable & Destroyable: When you want to configure something before the "running state", you can extend the Configurable class and implement the method configure or if you want to execute something before the destruction, you can extend the Destroyable class and implement the method destroy
  • Automatic Components Scan: By default, classes decorated with an Application Components Decorator and placed in the scan path, will be automatically registered in the Core. You can disable this feature and manually inject into your main class, the components. For more information, please visit the documentation
  • Overridden: In some cases, we want to create a custom class and replace the old behavior, thinking about it, the @Configuration and @Service can be used to do this. When you pass as argument a class in these decorators, the core will inject the override class instead of the original class at the injection points
  • YAML Application Properties: We use YAML format to provide a lot of properties that can enable some feature or change their behavior

Installing

TheWay is built for projects designed with NodeJs and Typescript.

You can check how to create a NodeJs + Typescript project here

Installing the TheWay:

For Yarn

yarn add @umberware/the-way

For Npm

npm install @umberware/the-way

Remember to install @types/node as dev dependencies when you are using the typescript with Node

Getting Started

In this section, we will create a simple application that uses TheWay.

It is imperative that you have: NodeJs installed and a NodeJs project configured to use typescript. You can check how to configure Node.js to work with Typescript in this guide: NodeJs With Typescript

Installing: @umberware/TheWay

npm install @umberware/the-way

Creating: A Main class(src/main/main.ts)

import { Application, TheWayApplication, Inject, CoreLogger } from '@umberware/the-way';

@Application()
export class Main extends TheWayApplication {
    @Inject logger: CoreLogger;

    public start(): void {
        this.logger.info('Hello World');
    }
}

Running: The Typescript source code (via ts-node)

ts-node src/main/main.ts

Build & Run: The final Javascript code

Build

tsc

Running the built code

node disc/src/main/main.js

You can check how to build a REST application in this guide: TheWay: HeroesRest

For more examples or guides, you can access the The Way Examples Repository or/and Guides

Remember to install @types/node as dev dependencies when you are using the typescript with Node

Application Properties

This framework uses application properties in Yaml Format and has a lot of properties that can be changed for your use. If no application properties is provided, the framework will use the default properties. For more detail, please visit the Application Properties Documentation

Documentation

To access the full documentation you can access this