express-joi-simple
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "express-joi-simple", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
import * as express from 'express'; | ||
import { factory } from '../index'; | ||
import { router } from './router'; | ||
import * as joi from 'joi'; | ||
import { Doc, Validate } from '../index'; | ||
@@ -14,3 +14,3 @@ const app = express(); | ||
app.post('register',factory.validateJoiSchema(schema), (req: any, res: any) => { | ||
app.post('register',Validate(schema), (req: any, res: any) => { | ||
res.json({ | ||
@@ -24,4 +24,3 @@ message: 'register' | ||
app.listen(3000, () => { | ||
factory.generateDoc(app); | ||
console.log('App started on port 3000') | ||
Doc(app); | ||
}) |
import { Router } from 'express'; | ||
import { factory } from '../index'; | ||
import { Validate } from '../index'; | ||
import * as joi from 'joi'; | ||
@@ -13,4 +13,4 @@ | ||
router.post('/test', factory.validateJoiSchema(schema), (req: any, res: any) => { | ||
router.post('/test', Validate(schema), (req: any, res: any) => { | ||
res.json({ message: 'test' }); | ||
}) |
@@ -1,3 +0,2 @@ | ||
import { ExpressJoiSimple } from './express-joi-simple'; | ||
export const factory = new ExpressJoiSimple(); | ||
export * from './Doc'; | ||
export * from './Validate'; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42
15489
216