I noticed that the docker file was installing the dev dependencies in the production docker image e.g. eslint isn't required in the production image. I fixed this by moving the NODE_ENV production line before the npm install commands (this causes npm to only install the production packages akin to specifying --production c.f. the npm docs).
However, this broke the interface where there were packages that were incorrectly listed in the dev dependencies section rather than the production dependencies section. I have fixed this.
I thought I'd also take the opportunity to clean up the dependencies and used npm-check-unused to find potential packages that could be removed. I've removed the ones it flagged which weren't required for the interface to work.
to launch a UI using these changes (n.b. the dockerfile copies everything including the node_modules directory over to the image so it's important you delete this directory or use a fresh clone).
I then tested the core functionality of the UI checking for any signs of breakages or errors in the console. I tested:
Creating a new app
Editing an existing app
App validation e.g. entering a syslog URL without tcp://
Creating a new function
Editing an existing function
Running a function with and without a payload
The metrics e.g. running functions are shown on the graphs
About
I noticed that the docker file was installing the dev dependencies in the production docker image e.g.
eslint
isn't required in the production image. I fixed this by moving theNODE_ENV production
line before the npm install commands (this causes npm to only install the production packages akin to specifying--production
c.f. the npm docs).However, this broke the interface where there were packages that were incorrectly listed in the dev dependencies section rather than the production dependencies section. I have fixed this.
I thought I'd also take the opportunity to clean up the dependencies and used npm-check-unused to find potential packages that could be removed. I've removed the ones it flagged which weren't required for the interface to work.
Testing
I cloned a fresh repo and used:
to launch a UI using these changes (n.b. the dockerfile copies everything including the
node_modules
directory over to the image so it's important you delete this directory or use a fresh clone).I then tested the core functionality of the UI checking for any signs of breakages or errors in the console. I tested:
tcp://
I need to add Selenium tests sometime!