npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@solidgoldpig/fb-runner-node

v0.0.163

Published

Form Builder Runner (Node version)

Downloads

110

Readme

fb-runner-node

Build Status

Form Builder Runner is an application that provides generic backend code and templates to create forms from data representations.

For more details, read the Runner’s documentation

Pre-requisites

Node

Installing

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

Usage

Set the SERVICE_PATH environment variable to point the path of form data on your filesystem.

SERVICE_PATH=/path/to/form npm start

An example form can be checked out from https://github.com/ministryofjustice/fb-example-service

By default, Form Builder Runner will use port 3000. If you want to run on a different port, set the PORT environment variable.

PORT=4321 SERVICE_PATH=/path/to/form npm start

Components usage

By default the runner uses the module @solidgoldpig/fb-components-core, using the version defined in lib/constants/constant.js

Read more about components usage

Using the fb-runnner-node with a mocked backend

Use fb-mock-services to mock out the services which your local instance of fb-runner-node (this repo) communicates with.

  • In one terminal tab, run the fb-mock-services project according to its instructions (e.g. MOCKENV=yes npm start)
  • Create an .envmocks file within this project, the contents of which are:
export USER_DATASTORE_URL=http://localhost:44444
export USER_FILESTORE_URL=http://localhost:44445
export SUBMITTER_URL=http://localhost:44446
export SERVICE_SECRET=sekrit
export SERVICE_TOKEN=token
export SERVICE_SLUG=slug
export MODULE__ministryofjustice_fb_components_core='/path/to/your/form-builder/fb-components-core'
  • Within this fb-runner-node repo, run this command: source .envmocks && SERVICE_PATH=/path/to/your/form npm start

If you are not developing runner features, consider using the Form Builder Editor Console instead.

Testing

npm test

Run unit tests only

npm run test:unit

Run a single unit test

./node_modules/.bin/multi-tape lib/controller/page/type/page.summary/page.summary.controller.unit.spec.js

Run linting only

npm run lint

To deploy and run on Cloud Platforms

See deployment instructions