rework how the frontend is started (#361)

renamed frontend-config to api-url
renamed backend-config to config
removed api call to set frontend-config as the frontend either know where the backend is as it is delivered by it or get's this information via the enviroment variable REACT_APP_BACKEND
always start the client on Port 3001 as the backend will run on 3000 during development. changed the port on multiple occasions to accommodate for this
added package.json script 'start:dev'
changed README to better explain how to run backend and frontend side-by-side
This commit is contained in:
Philip Molares 2020-07-29 22:58:01 +02:00 committed by GitHub
parent 287d2e2729
commit d0fc96b929
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 173 additions and 182 deletions

View file

@ -7,7 +7,7 @@ export interface DocumentTitleProps {
}
export const DocumentTitle: React.FC<DocumentTitleProps> = ({ title }) => {
const branding = useSelector((state: ApplicationState) => state.backendConfig.branding)
const branding = useSelector((state: ApplicationState) => state.config.branding)
useEffect(() => {
document.title = `${title ? title + ' - ' : ''}CodiMD ${branding.name ? ` @ ${branding.name}` : ''}`