Skip to content

This is an example frontend for an OCS project using components from ocs-component-lib.

Notifications You must be signed in to change notification settings

observatorycontrolsystem/ocs-example-frontend

Repository files navigation

ocs-example-frontend

This is a frontend project demonstrating use of the ocs-components-lib, and the general capabilities of an observatory control system.

The easiest way to interact with this frontend is to run a full example project with the ocs_example.

Environment variables

Variable Description Default
VUE_APP_OBSERVATION_PORTAL_API_URL Observation portal API URL http://127.0.0.1:8000

Project setup

Install the frontend dependencies:

npm install

Local Development

If you are developing locally, you will need to have a running observation portal.

Make sure you enable cross origin resource sharing for the frontend domain when running the observation portal. For example, if your frontend is running at http://127.0.0.1:8080, you could set the following environment variables for the observation portal:

export CORS_ORIGIN_WHITELIST=http://127.0.0.1:8080
export CSRF_TRUSTED_ORIGINS=127.0.0.1:8080

Note: 127.0.0.1 and localhost are not interchangable here. If you want both to work in the browser, set both values in the configdb variables (ie. export CSRF_TRUSTED_ORIGINS=127.0.0.1:8080,localhost:8080).

Then, to run a hot-reload server for developing on the frontend:

npm run serve

Compile and minify for production

npm run build

Lint and fix files

npm run lint:fix

About

This is an example frontend for an OCS project using components from ocs-component-lib.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •