0.0.2 • Published 11 months ago
@assetval/license v0.0.2
License
This is the Veritas License Schema workspace.
Installation
yarn add @assetval/license
Usage
As a Class (Front End)
import { License } from '@assetval/license';
const license = new License();
As Schema (Back End)
import { {License}Schema, License } from '@assetval/license';
import { Model } from 'mongoose';
export const {License}Model = model<License>('{license}es', {License}Schema);
As Validation (Back End)
import { {License}ValidationSchema } from '@assetval/license';
import { z } from 'zod';
import { MagikRoutes } from '../middleware/RouterManager.js';
const ProfileRoute = MagikRoutes.getRouter('/profile');
ProfileRoute.post('/updateLicense', {
auth: 'ensureAuthenticated',
validationSchema: z.object({
body: {License}ValidationSchema
}),
route: async (req, res): Promise<void> => {
// Do something
}
});
License
MIT
Authors
Contributing
Download the Schema repository and make sure you have the following installed:
- asdf
- NodeJS (ASDF)
- PNPM (Corepack / Node / ASDF)
- NX
Then run the following commands:
pnpm install