Nagging Mario's Princess

    @frontierjs/api

    0.0.18 • Public • Published

    Usage

    // in api/src/core/frontier.js
    
    // Make sure to place this in app.js AFTER app.configure(configuration)
    // to get access to all the config vars
    import Preload from '@frontierjs/api/preload'
    import Db from '@frontierjs/api/db'
    import Fetch from '@frontierjs/api/fetch'
    import Logger from '@frontierjs/api/logger'
    
    import { prismaHooks } from '../core/prisma.hooks'
    
    export default function (app) {
      [
        Preload(),
        Db({
          ...app.get('dbConfig'),
          prismaHooks
        }),
        Fetch(),
        Logger({
          dbLogFile: app.get('dbLogFile') || '.api.db.log'
        }),
      ].forEach((config) => app.configure(config))
    }
    // in api/src/core/prisma.hooks.js
    
    import {
      castNumbers,
      removeRelations,
      removeExtra,
      stringifyModelFields,
      parseModelFields,
      setUpdatedAt
      } from '@frontierjs/api/prisma-hooks'

    Keywords

    Install

    npm i @frontierjs/api

    DownloadsWeekly Downloads

    106

    Version

    0.0.18

    License

    ISC

    Unpacked Size

    1.17 MB

    Total Files

    11

    Last publish

    Collaborators

    • jdkdev