Skip to content

Latest commit

 

History

History

relinkr-ui

reLinkR UI

Project setup

% npm install

Compiles and hot-reloads for development

% npm run serve

Run your tests

% npm run test

Lints and fixes files

% npm run lint

Run your unit tests

% npm run test:unit

Compiles and minifies for production

% npm run build

Compiles and minifies for staging

% npm run build -- --mode staging

Deployment

  1. Setup base path for the app

If you wish to use a non-root directory for the front-end, in that case Vue router must know the path prefix to perform navigation properly. Environment variable VUE_APP_UI_BASE_PATH makes that happen.

Create a file .env.staging.local or .env.production.local depending on which environment are you building for and add the following content.

VUE_APP_AUTH_TOKEN_FETCH_STRATEGY=api
VUE_APP_UI_BASE_PATH=/<path>

Note: If you wish to deploy to your own domain, then you can safely remove VUE_APP_AUTH_TOKEN_FETCH_STRATEGY in which case it's going to default to cookies. Strategy api enables the app to be deployed for demonstration purposes where both the back-end and the front-end are deployed to completely different domains given by the underlying cloud provider (eg. <projectId>.appspot.com and <projectId>.firebaseapp.com).

  1. Setup API base URL

A default value for VUE_APP_API_BASE_URL is set for both staging and production and you'll have to change that for your own deployment. The procedure is the same as above, that is, add the custom value to .env.staging.local or .env.production.local.

  1. Compile and minify for staging or production
% npm run build -- --mode staging
% npm run build
  1. Authenticate with Firebase
% firebase login
  1. Create and add a project

Open the Firebase Console to create a project.

Note: Firebase projects are Google Cloud Platform projects that use Firebase services. This means that unique identifiers for a project (like Project ID) are shared across consoles.

% firebase use --add
  1. Upload front-end
% firebase deploy
  1. Setting up a custom domain.

Refer to Connect a custom domain on how to add a custom domain to your deployment if you have one.

Customize configuration

See Configuration Reference.