Skip to content

SCV-Soft/undefined-hackton-bridge

Repository files navigation

nestjs-admin-template

Requirement

  • Nodejs > 14

How to run

development

yarn dev

Production

yarn prod

Build

yarn build

Documents

Adding Resources

  1. Goto src/adminjs/resources
  2. Add Resource (Maybe Prisma, Maybe Custom)
  3. END :I

Template

import { dmmf, client } from "@/prisma/dmmf";

export const CreatePostResource = () => ({
  resource: {
    model: dmmf.modelMap.Post,
    client,
  },
  features: [],
  options: {
    properties: {
      content: { type: 'richtext' },
      someJson: { type: 'mixed', isArray: true },
      'someJson.number': { type: 'number' },
      'someJson.string': { type: 'string' },
      'someJson.boolean': { type: 'boolean' },
      'someJson.date': { type: 'datetime' },
    },
  },
});

TL;DR

저기 위에 있는 링크 따라가서 코드 구조 가져오면 됨