Newsworthy Presidential Mistakes

    TypeScript icon, indicating that this package has built-in type declarations

    0.0.4 • Public • Published

    Expressive Tea

    Expressive Tea

    A Typescript Framework to create RESTful Services.


    Allows to user create own recipes of their own configurations for Expressive Tea Projects which will helps to agilize and repeatable patterns. In example: A User can make plugin configurations for a REST API projects and include all the express middlewwares and configurations and make it reusable. Also allows users shares their best flavored settings for new projects.

    This Package is only COMPATIBLE with Expressive Tea >= 1.1.x


    $ npm install @expressive-tea/plugin


    Create a new file import the Plugin class and the Boot Stages as is showing in the next example:

    import { Plugin, BOOT_STAGES } from "@expressive-tea/plugin"
    import { Stage } from "@expressive-tea/plugin/decorators"
    import { Express } from "express"
    export default class PluginTest extends Plugin {
    	protected name: string = "Plugin Test"
    	protected priority: number = 100
    	protected dependencies: string[] = []
    	test(server: Express) {
    		server.use((req, res, next) => {
    			console.log("TEST from Plugin")
    	secondTest(server: Express) {
    		server.use((req, res, next) => {
    			console.log("SECOND TEST from Plugin")

    Then in the file where you have setting up your Expressive Tea project you need to use the Pour decorator and made an instance of your plugin to attach it to current project.

    	port: 8080
    @Pour(new PluginTest())
    class Bootstrap extends Boot {}
    const bootstrap = new Bootstrap()


    Abstract Class Plugin

    Placeholder abstract class to allow define staged methods and main information.


    Modifier Name Type Description Default
    Protected name String Defined the plugin name. Class Name
    Protected priority Number Defined Priority order. 999
    Protected dependencies String[] Defined Plugin Dependencies. []
    abstract class Plugin {
        readonly settings: ExpressiveTeaPluginSettings;
        protected name: string;
        protected priority: number;
        protected dependencies: string[];
        private static isDependencyRegistered;
        constructor(settings?: ExpressiveTeaPluginSettings);
        getRegisteredStage(stage: BOOT_STAGES): any;

    Stage Method Decorator

    Define a Method that will be run it on a Expressive Tea defined Boot Stages.

    @Stage(stage: BOOT_STAGES, required?: Boolean): (target: any, propertyKey: any, descriptor: any) => void;
    method(server: Express): void;


    interface ExpressiveTeaServerProps {
        port?: number;
        [key: string]: any;
    interface ExpressiveTeaPluginProps {
        name: string;
        priority: number;
    interface ExpressiveTeaPluginSettings {
        priority?: number;
        name?: string;
        dependencies?: string[];
        [key: string]: any;


    If you are experience any kind of issues we will be happy to help. You can report an issue using the issues page or the chat. You can also ask questions at Stack overflow using the expressive-tea tag.

    If you want to share your thoughts with the development team or join us you will be able to do so using the official the mailing list. You can check out the wiki to learn more about Expressive Tea internals or check our documentation.


    This project is licensed under the Apache-2.0 License - see the LICENSE file for details


    The banner and the logo is a derivate work Designed by Freepik


    npm i @expressive-tea/plugin

    DownloadsWeekly Downloads






    Unpacked Size

    228 kB

    Total Files


    Last publish


    • expressivetea
    • dresendez