Florence
The publishing platform used for the ONS website.
Getting started
To run Florence you must have:
-
Golang installed:
brew install go
-
nvm installed:
brew install nvm
⚠ Make sure to follow the instructions provided at the end of the install to configure up your shell profile.
-
The node version specified in .nvmrc
installed through nvm:
nvm install
Once you have installed those dependencies and cloned this repo you need to run the following:
-
Move into the correct directory
cd florence
-
Build node modules (you won't need to do this everytime only when the assets need to be rebuilt)
make node-modules
-
Run the server
make debug
Steps 2 & 3 can also be run with the following command:
make dev
This will build the node modules and then run the server
-
Browse to the Florence homepage http://localhost:8081/florence
-
If you are running Florence for the first time you will need to login with the setup credentials. You will be asked to change this password.
Username: florence@magicroundabout.ons.gov.uk
Password: Doug4l
Further guidance on how to use Florence can be found in usage.md
Dependencies
There are other ONS digital applications that you'll need to run to allow Florence to work end-to-end:
Optional (for developing Florence)
-
Install NodeJS and NPM
-
Watch for JS, CSS and other source file changes
make watch-src
-
Update JS, CSS and other source file changes
make node-modules
Configuration
The following environment variables are available when running the Go server.
The following envrionment variables are available when running the Go server and within the React application:
Environment variable |
Default |
Description |
ALLOWED_EXTERNAL_PATHS |
[]string |
Permitted external primary path and subpath from Florence e.g. primary path /data-admin allows /data-admin/* |
ENABLE_DATASET_IMPORT |
true |
Displays the screens to allow filterable datasets to be imported through Florence (note: it requires the whole CMD stack to be running) |
ENABLE_NEW_SIGN_IN |
false |
Enables the new sign in using the identity API (rather than zebedee) |
ENABLE_NEW_UPLOAD |
false |
Enables the image upload functionality via static files service |
ENABLE_PERMISSION_API |
false |
|
ENABLE_CANTABULAR_JOURNEY |
false |
Enables the cantabular journey |
For example:
make debug BIND_ADDR=:20000
Testing
Run all tests
npm run test
Testing a single file
npm run test:file --file=<YOUR_FILE>
Contributing
See CONTRIBUTING for details.
License
Copyright © 2016-2024, Office for National Statistics (https://www.ons.gov.uk)
Released under MIT license, see LICENSE for details.