Setup

As easy as cake Start working with Flew in 2 easy steps, for any framework, either on client or server.

Install

npm install @flew/core

Configure

import { setup } from '@flew/core';

setup({
  options: {
    // ... list of options
  },
  plugins: [
    // ... list of plugins
  ],
});
const { setup } = require('@flew/core');

setup({
  options: {
    // ... list of options
  },
  plugins: [
    // ... list of plugins
  ],
});

Options

Set of Flew options for initialization

namedefaultdescription
identifierobjectIdcolumn or field name used to identify your data
disableAutoIDfalseautomatically create an id for each new record/document
baseURLnullhttp only. eg: https://api.thecatapi.com
endpointnullhttp only. eg: /v1
pathnamenullhttp only. eg: /some/long/path/to/the/resource?with=params&items=true
httpConfigFlewRequestConfigused to extend http config. learn more
driverhttpdefault driver. can also be customized in runtime fetch('User').from('parse')
timestampEnabledtrueenable/disable timestamp auto creation
timestampObjectfalsewhether or not use Date object or toISOString
timestampCreatedcreated_atfield name for the "created" timestamp
timestampUpdatedupdated_atfield name for the "updated" timestamp
silentfalsewhether or not display internal logs
loggerLoggerlogger instance
useCachetruewhether or not use cached results in the fetch stream
useStatetruewhether or not use memoized network state in the fetch stream
useNetworktrueenable/disable network calls
persistence 🧪doc_idfirestore only. experimental persistence layer for tabs
Edit this page on GitHub Updated at Sun, Nov 27, 2022