1.0.1340 • Published 2 months ago

pl-claims-hub v1.0.1340

Weekly downloads
-
License
-
Repository
-
Last release
2 months ago

PL Claims Hub

Frontend application for the PL Claims Hub project.

Getting Started

Be sure to have the Fort Awesome Pro token before running npm i. Follow the directions here on how to install the token on your machine. Reach out to one of the devs for the token.

# Clone the repository
git clone git@github.com:dais-technology/pl-claims-hub.git

# Install the dependencies
npm i

Development

In development mode, two servers will be running concurrently:

  • Webpack serving React on localhost:3000
  • Express serving the backend on localhost:5000

Express (via nodemon) will reload on any update to the server directory, and Webpack will refresh on any change to the client directory.

Start development mode

# Concurrently start both servers
npm run dev

Production

Only one server will be running in production mode. Webpack will bundle all the client side files and Express will serve the entire client app from the / route on localhost:5000.

Build and start production server

# Build the client
npm run build

# then start the server
npm start

Documentation

Tests

Run the tests

npm run test

Path Aliases

We use the babel-plugin-module-resolver plugin to simplify and standardize import paths throughout the codebase. See the .babelrc file for an example alias config, if you'd like to add more. In order to keep autocomplete and go-to-source functionality in IDEs, be sure to follow these steps when updating or adding an alias.

Frontend Build Analysis

If you want to analyze the production webpack output, run npm run webpack-prod-stats, take that output and head over to webpack.github.io/analyse, which is the official webpack analysis tool. Other analysis tools can be found here.