Git Product home page Git Product logo

platform-core's Introduction

FOLIO core platform

Copyright (C) 2015-2019 The Open Library Foundation

This software is distributed under the terms of the Apache License, Version 2.0. See the file "LICENSE" for more information.

Introduction

This is the "core" Stripes "platform". It consists simply of an NPM package.json that specifies the version of @folio/stripes-core and of any Stripes modules you wish to make available as part of the "core" platform to generate client bundles along with a utility for generating module descriptors for each Stripes module.

Please see the quick start guide for more information.

The stripes.config.js is a configuration for a specific tenant. In general, a platform supports multiple tenants, each of which may include a different set of the available modules. You can copy the stripes.config.js file to be your stripes.config.js.local configuration file.

Installation

Install platform dependencies

$ yarn config set @folio:registry https://repository.folio.org/repository/npm-folioci/
$ yarn install

Build and serve

To build and serve platform-core in isolation for development purposes, run the "start" package script.

$ yarn start

The default configuration assumes an Okapi instance is running on http://localhost:9130 with tenant "diku". The options --okapi and --tenant can be provided to match your environment.

$ yarn start --okapi http://localhost:9130 --tenant diku

To build a platform-core bundle for production, modify stripes.config.js with your Okapi and tenant, then run the "build" script, passing it the name of the desired directory to place build artifacts.

$ yarn build ./output

See the build and serve command reference in stripes-cli for a list of available options.

Tests

Integration tests

Integration tests require a running Okapi. The default configuration expects Okapi running on http://localhost:9130 with tenant "diku". To build and run integration tests for platform-core with these defaults, run the test-int script.

$ yarn test-int

To view tests while they are run, provide the --show option.

$ yarn test-int --show

To skip the build step and run integration tests against a build that is already running, provide the URL.

$ yarn test-int --url http://folio-testing.aws.indexdata.com/

As a convenience, --local can be used in place of --url http://localhost:3000 for running tests against a development server that has already been started.

$ yarn test-int --local

Regression tests

Integration tests for the entire platform and its apps can be run with the "test-regression" script. This will invoke both cross-module tests defined in this platform's repository as well as all integration tests defined for the individual apps.

$ yarn test-regression --url http://folio-testing.aws.indexdata.com/

Running specific tests

The test-int package script, when combined with the --run option, can be used for running specific tests for the platform and/or apps. Use WD (working directory) when referencing platform tests, otherwise use the module app module name.

Example running "loan_renewal" test in platform-core:

$ yarn test-int --run WD:loan_renewal

Example running "new_user" test in ui-users:

$ yarn test-regression --run users:new_user

Build stripes using the Dockerfile

The included Dockerfile allows for building a container that serves the stripes platform using Nginx. Pass in the Okapi URL and tenant ID as build arguments. The defaults are shown below:

docker build -f docker/Dockerfile \
  --build-arg OKAPI_URL=http://localhost:9130 \
  --build-arg TENANT_ID=diku -t stripes .

The nginx server name can be passed to the container at runtime. The defualt value is localhost if no argument as passed. For example, to have nginx use 127.0.0.1 as the server name:

docker run stripes 127.0.0.1

Additional information

See project FOLIO at the FOLIO issue tracker.

Other FOLIO Developer documentation is at dev.folio.org

platform-core's People

Contributors

adi-mat avatar cherewaty avatar cledvina avatar dcrossleyau avatar dependabot[bot] avatar doytch avatar evaluk avatar funkymalc avatar id-jenkins avatar ihardy avatar jeremythuff avatar khemchandra avatar khemnavet avatar mkuklis avatar nielserik avatar oleksandrantonenko1 avatar renovate-bot avatar ryandberger avatar ttamj avatar zburke avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.