🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@hoth/molecule

Package Overview
Dependencies
Maintainers
4
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hoth/molecule

molecule plugin for hoth framework

latest
Source
npmnpm
Version
1.1.5
Version published
Maintainers
4
Created
Source

@hoth/molecule

Demo

controller.ts

import {FastifyLoggerInstance} from 'fastify';
import {Controller as IController} from '@baidu/molecule';

export class Controller implements IController {
    root: string;
    logger: FastifyLoggerInstance;

    constructor(options: Option) {
        this.logger = options.logger;
        this.root = options.root;
    }

    render(data: Data) {
        return `appname is ${data.appname}, route name is ${data.name}, title is ${data.title}`;
    }
}

node server

import {molecule} from '@hoth/molecule';

let ret = await molecule(ctrlPath, data, {
    root: '/dist',
    appName: 'appname',
    name: 'route name',
    logger: fastify.log,
});

Keywords

molecule

FAQs

Package last updated on 29 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts