Skip to main content

Create a bonFHIR app

Usage

The create command can initialize a new FHIR application from a template.

This command can be invoked 2 different ways:

Using this package

npx @bonfhir/cli@latest create

Or using the create package for a nice shorthand syntax:

npm create bonfhir@latest

The @latest is important as it makes sure that you are always using an up-to-date package.

Flags

  • -n / --name: the name of the project to create (which is alos the directoy name); must not contains any space (e.g. my-awesome-fhir-project)
  • -t / --template: the template to use
  • -p / --package-manager: the package manager to use (e.g. npm, yarn or pnpm)

Available templates:

We currently offer the following templates:

Included development FHIR server

All projects comes with a local FHIR server setup that can be used for development (if you have Docker installed). Simply use the following command to launch it:

npm run fhir:start-server

Wait for a few minute for the server to start (you can look in the docker logs for a Server started statement).

Then open http://localhost:8100 and login using the default credentials:

  • Username: admin@example.com
  • Password: medplum_admin
  • Project: "Default Project"

The following command will also launch the import of synthetic patient data into the FHIR server

  • using it while the server is running:
npm run fhir:add-sample-data