Registry / devops / mikudos-node-app

mikudos-node-app

JSON →
library1.1.23jsnpmunverified

mikudos-node-app is a gRPC microservice framework for Node.js (v1.1.23), built on top of Mali.js. It provides decorators (@Service, @Method, @HookService, @HookMethod) and dependency injection to quickly implement gRPC services with TypeScript. Unlike raw Mali, it offers a declarative API with a built-in Application class, service registration, and hook middleware. Release cadence is irregular; last update 2020. Requires grpc peer dependency and Node >=12.

npm install mikudos-node-app
INSTALL
IMPORT
SIG · MIKUDOS-NODE-APP
M
mikudos-node-app
devopsjavascriptv1.1.23
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Application
import { Application } from 'mikudos-node-app'
const { Application } = require('mikudos-node-app'); // works but ESM preferred
Primary class; ESM or CJS both supported.
Service
import { Service } from 'mikudos-node-app'
import Service from 'mikudos-node-app'; // default export not available
Named export, decorator for service class.
App
import { App } from 'mikudos-node-app'
import { App } from 'mali'; // wrong package
Parameter decorator to inject Application instance.
Customer
import { Customer } from 'mikudos-node-app'
import { Customer } from 'customer'; // not an external package
Custom parameter decorator for injectable values.

Minimal gRPC server with decorator-based service registration, hooks, and parameter injection.

import * as path from 'path'; import { Application, Service, Method, HookMethod, HookService, App, Customer } from 'mikudos-node-app'; const PROTO_PATH = path.resolve(__dirname, './example.proto'); const app = new Application(PROTO_PATH); @Service({ name: 'GreeterService', serviceName: 'GreeterService' }) @HookService('before', async (ctx, next) => { console.log('service hook'); await next(); }) export class Greeter { constructor(@App() private app: Application, @Customer('test') private test: any) {} @Method('SayHello') @HookMethod('before', async (ctx, next) => { console.log('method hook'); await next(); }) async SayHello(ctx: any, next: Function) { ctx.res = { message: 'Hello ' + ctx.req.name }; next(); } } app.register(Greeter); app.start('0.0.0.0:50051'); console.log('Server running on 0.0.0.0:50051');
Debug
Known issues
breakingJavaScript users must use version 1.0.16; newer versions require TypeScript and decorator support.
fix
Use version 1.0.16 for plain JavaScript projects.
affects: >=1.1.0
deprecatedThe 'grpc' package is deprecated; consider using '@grpc/grpc-js'.
fix
Replace peer dep 'grpc' with '@grpc/grpc-js' and update imports accordingly.
affects: >=0.0.0
gotchaDecorators require transpilation; TypeScript target must support decorators.
fix
Enable 'experimentalDecorators' in tsconfig.json.
affects: >=1.1.0
deprecatedThe 'HookService' and 'HookMethod' decorator names may conflict with Mali's middleware pattern.
fix
Use Mali's native middleware if upgrading to newer Mali versions.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'grpc'
Missing peer dependency 'grpc'.
fix
npm install grpc
TypeError: Class constructor Application cannot be invoked without 'new'
Using 'require' without destructuring or calling constructor incorrectly.
fix
Use correct import: const { Application } = require('mikudos-node-app');
TypeError: (0 , _mikudosNodeApp.Service) is not a function
Decorator not transpiled; missing 'experimentalDecorators' in tsconfig.json.
fix
Add 'experimentalDecorators': true to tsconfig.json compilerOptions.
Upgrade
Version history
1.1.23latest on npm
Audit
Dependencies
grpcrequiredPeer dependency required for gRPC functionality
Agent activity
3 hits · last 30 days
node
2
Amazon
1
Resources
mikudos-node-app — npm install mikudos-node-app · libregistry