Giter VIP home page Giter VIP logo

fb-editor-node's Introduction

fb-editor-node

Form Builder Editor creates forms as configuration data for Form Builder Runner.

Pre-requisites

Node >= 12.4.0

Installation

git clone [email protected]:ministryofjustice/fb-editor-node.git
cd fb-editor-node
npm install

Usage

The SERVICE_PATH environment variable describes the location on your file system of the form for Editor to use.

To set the SERVICE_PATH environment variable, open a terminal and change into the root directory of Runner, then execute the command:

SERVICE_PATH=[path to form] npm start

(Where [path to form] is a path to the location on your file system of the form. An Example Service form can be cloned from https://github.com/ministryofjustice/fb-example-service.)

By default, Editor will start on localhost port 3000.

To run on a different port, set the PORT environment variable:

PORT=4321 SERVICE_PATH=[path to form] npm start

Testing

npm test

Linting

npm run lint

Module Aliases

Some module paths are aliased.

At runtime they are resolved with @ministryofjustice/module-alias. (Its definitions can be found in the _moduleAliases {} field on package.json.)

During development aliases can be resolved in different ways according to needs of the developer's IDE. A solution we provide is via Webpack, which is supported automatically in WebStorm and related IDEs, or with some manual steps.

At start-up WebStorm will report in the Event Log that "Module resolution rules from webpack.config.js are now used for coding assistance" if the configuration is automatically identified -- if not, follow the manual steps:

  1. Right-click on the lib directory and select Mark Directory as > Resource root
  2. From the application menu select Preferences > Languages & Frameworks > JavaScript > Webpack then in the right-hand pane use the file browser to select webpack.config.js from the package root

You shouldn't need to restart but it won't hurt.

fb-editor-node's People

Contributors

sequencemedialimited avatar solidgoldpig avatar dependabot-preview[bot] avatar brenetic avatar tomas-stefano avatar njseeto avatar dependabot[bot] avatar mattempty avatar asmega avatar tommotaylor 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.