Gathering detailed insights and metrics for @neo9/n9-node-routing
Gathering detailed insights and metrics for @neo9/n9-node-routing
Gathering detailed insights and metrics for @neo9/n9-node-routing
Gathering detailed insights and metrics for @neo9/n9-node-routing
Express app skeleton based on routing-controllers
npm install @neo9/n9-node-routing
Typescript
Module System
Min. Node Version
Node Version
NPM Version
Release 3.0.0
Updated on Nov 15, 2023
Release 3.0.0-rc.11
Updated on Nov 10, 2023
Release 3.0.0-rc.10
Updated on Nov 08, 2023
Release 3.0.0-rc.9
Updated on Nov 08, 2023
Release 3.0.0-rc.8
Updated on Oct 30, 2023
Release 3.0.0-rc.7
Updated on Oct 27, 2023
TypeScript (99.73%)
JavaScript (0.27%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
GPL-3.0 License
8 Stars
357 Commits
8 Forks
3 Watchers
12 Branches
6 Contributors
Updated on Jun 18, 2024
Latest Version
3.0.0
Package Id
@neo9/n9-node-routing@3.0.0
Unpacked Size
295.86 kB
Size
64.31 kB
File Count
150
NPM Version
10.1.0
Node Version
20.9.0
Published on
Nov 15, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
33
33
Wrapper of project routing-controllers
Example :
1import { Acl, Body, Get, JsonController, Service, Post } from 'n9-node-routing'; 2 3@Service() 4@JsonController('/foo') 5export class ValidateController { 6 @Acl([{ action: 'readFoo', user: '@' }]) 7 @Get('/details') 8 public async getFoo(): Promise<object> { 9 return { 10 foo: 'bar', 11 }; 12 } 13 14 @Post('/') 15 public async createFoo(@Body() body: ElementRequestCreate): Promise<any> { 16 return body; 17 } 18}
:warning: Some class-validator features changes between v 1.26 and 1.29 :
:warning: BREAKING CHANGES when upgrading to n9-node-routing
V3
n9-node-routing
to @neo9/n9-node-routing
@Inject('N9HttpClient') httpClient: N9HttpClient
→ @Inject() httpClient: N9HttpClient
@Inject('conf') conf: Configuration
→ @Inject() conf: Configuration
@Inject('logger') logger: N9Log
→ @Inject() logger: N9Log
or in constructor parameters logger: N9Log
global
properties :
global.conf
and global.log
are not set or used anymoreglobal.db
and global.dbClient
are not used toocallbacksBeforeShutdownAfterExpressEnded
to stop databasesclass-transformer
update.
classToPlain
→ instanceToPlain
plainToClass
→ plainToInstance
class-validator
and class-transformer
update to version 0.14.0
and 0.5.1
:warning: BREAKING CHANGES when upgrading to n9-node-routing
V2
beforeRoutingControllerLaunchHook
and afterRoutingControllerLaunchHook
) now an object is passedisEnable
is renamed isEnabled
with same default value as before to true
n9-node-routing
now load the app configuration/ping
response is now an object : { response: 'pong' }
/
response is now an object: { name: 'myApi' }
/version' response is now an object :
{ version: '1.2.3' }`n9NodeRoutingOptions.prometheus.isEnabled: false
Documentation available as openapi 3.0 format : /documentation.json
Swagger UI for API available at : /documentation
A starter app is available here : https://github.com/neo9/n9-node-microservice-skeleton
At startup n9NodeRouting
does in order :
process.version
)*.init.ts
(actually *.init.js
). Call default exported function with params : logger
, conf
*.started.ts
(actually *.started.js
). Call default exported function with params : logger
, conf
Unified HttpClient using got
Cargo to group multiple small task into a bigger one, for example, multiple http calls
HttpCargoBuilder a simpler way to build a cargo to group HTTP calls
Validate configuration at startup and expose it on endpoint /conf
:warning: To hide passord, use the transformer like one of this usage
1 @Allow() 2 @Transform(SecretTransformer.GET_TRANSFORMER()) 3 secret?: string; 4 5 @Allow() 6 @Transform(SecretTransformer.GET_TRANSFORMER(SecretType.OPAQUE)) 7 secretOpaque?: string; 8 9 @Allow() 10 @Transform(SecretTransformer.GET_TRANSFORMER(SecretType.OPAQUE)) 11 secretOpaqueNil?: string; 12 13 @Allow() 14 @Transform(SecretTransformer.GET_TRANSFORMER(SecretType.INVISIBLE)) // default 15 secretInvisible?: string; 16 17 @Allow() 18 @Transform(SecretTransformer.GET_TRANSFORMER(SecretType.URI)) 19 secretUri?: string;
To use Sentry you only have to ask it to n9-node-routing :
SENTRY_DSN
and it will activate it with default options.dsn
.Default enabled options are :
To run all test : yarn test
To run a test containing foo : yarn test **/*foo*
To debug a test containing foo : yarn test:dev **/*foo*
it will watch your files a re-run this test each time
Install all dependencies and install git hooks with husky :
yarn
Run the project tests:
yarn test
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
31 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More