How to use the falcor.model function in falcor

To help you get started, we’ve selected a few falcor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ParabolInc / falcor-saddle / test / index.spec.js View on Github external
import falcorExpress from 'falcor-express';
import FalcorRouter from 'falcor-router';
import Falcor from 'falcor';
import HttpDataSource from 'falcor-http-datasource';

import { cache } from './data/cache.js';

import { getCore } from './get.spec.js';
import { setCore } from './set.spec.js';
import { callCore } from './call.spec.js';

const SERVER_PORT = 15649;
const FALCOR_MODEL = '/model.json';
const FALCOR_MODEL_URL = `http://localhost:${SERVER_PORT}${FALCOR_MODEL}`;

const cacheModel = Falcor.model({
  'cache': cache
});

describe('starting server', function() {
  getCore(cacheModel);
  setCore(cacheModel);
  callCore(cacheModel);
});