项目作者: entur

项目描述 :
Front-end for Nplan
高级语言: TypeScript
项目地址: git://github.com/entur/enki.git
创建时间: 2019-01-09T09:33:15Z
项目社区:https://github.com/entur/enki

开源协议:

下载


Enki

Build
Quality Gate Status

Frontend app for Nplan - a simple timetable editor. Backend is Uttu.

Development

To run for development, simply do:

  1. npm install
  2. npm start

Note: The app uses Node version 18 (LTS).

To run together with a local instance of Uttu on port 11701, add the following to .env.development.local.

  1. REACT_APP_UTTU_API_URL=http://localhost:11701/services/flexible-lines

Configuration

Configuration is bootstrapped from /bootstrap.json, when the app loads. You should add your environment-specific
config to the deployment, along with the built static files (i.e. in the build/ folder).

For local development, add a bootstrap.json file to the public/ folder.

See src/config/ConfigContext.ts for the shape of the configuration.

Authentication

Uses OIDC for authentication. This solution is agnostic to which authentication provider you use.

Example configuration (works with Auth0):

  1. {
  2. "oidcConfig": {
  3. "authority": "https://<authentication domain>",
  4. "client_id": "<client id>",
  5. "extraQueryParams": {
  6. "audience": "<example audience>"
  7. }
  8. }
  9. }

For full configuration reference, see oidc-client-ts documentation.

Bypass authentication locally

It’s possible to bypass authentication locally with the configuration parameter disableAuthentication
set to true. This can be used in combination with the local-no-authentication profile in the backend.

Testing

Uses Jest for unit and reducer testing.

  1. npm test