Skip to content

Latest commit

 

History

History
112 lines (73 loc) · 2.38 KB

README.md

File metadata and controls

112 lines (73 loc) · 2.38 KB

publicmedia - frontend

Getting started

# all commands used in ./frontend
cd frontend

# install tools and frontend dependencies
pnpm install

Create environment files for development mode and production mode.

cp src/environments/environment.ts src/environments/environment.dev.ts
cp src/environments/environment.ts src/environments/environment.prod.ts

Note: These files will not be under version control but listed in .gitignore.

Usage

Recommendation

It is recommanded to use a server to get full access of all angular. For the other options your app should run on a server which you like.

Run in development mode

# build, reachable on http://localhost/app/path/to/dist/
pnpm build:dev

# build and starts a server, rebuild after changes, reachable on http://localhost:4200/
pnpm start

# build and starts a server, rebuild after changes, reachable on http://localhost:4200/ with proxy to prevent errors on instagram
pnpm proxy

Package

# build in production mode, compressed
pnpm build:prod

Tests

# test
ng test

# e2e
ng e2e

Configuration

General

All options have to been set in the environment files but some of them do not need to be changed. All defaults refer to the environment file (environment.ts), they are prepared in development mode (environment.dev.ts). Change for production mode the option production to true.

Table of contents

api

Defines the URL to the backend.

  • default: ./api/
  • type: string

appname

Applicationwide title of the app, displayed in title and toolbar.

  • default: publicmedia
  • type: string

defaultRoute

The default route and the route to be redirected after a login if no route is stored or if a route does not exist.

  • default: dashboard
  • type: string

production

Defines whether the app is in production or not.

  • default: false
  • type: boolean
  • values: true/false

theme

Name of a build-in theme from angular-material or a custom light or dark theme.

  • default: indigo-pink
  • type: string
  • values: deeppurple-amber/indigo-pink/pink-bluegrey/purple-green/custom-light/custom-dark

To create a custom light or dark theme just edit the colors and themes in themes.scss.