This is repository for the frontend for RecoFach application.
To install and run this repo locally for development perform following steps:
-
Clone the repository.
-
cd
into needed folder. -
Install dependecies
yarn install
-
Create
.env
file and define following in it:VUE_APP_API_URL
- Url of your backend endpointVUE_APP_API_PORT
- Port of your backend endpointVUE_APP_RECO_URL
- Url of your recommendation endpointVUE_APP_RECO_PORT
- Port of your recommendation endpoint
-
Done.
Follow these steps to create production-ready build. You will need docker have installed.
-
Build the docker image. You need do pass enviroment variables to specify location of backend service. Ensure to replace
api_url
andapi_port
values with yours.docker build \ --build-arg api_url="http://localhost" \ --build-arg api_port="8080" \ --build-arg reco_url="http://localhost" \ --build-arg reco_port="2000" \ -t recofach-frontend .
-
Run the docker image. Ensure map
3000
port to needed one.docker run -p 3000:3000 \ --name recofach-frontend recofach-frontend
To run development server - use following command:
yarn serve
To run optimizations and minifications for production build simply use:
yarn build
If you want more optimization run:
yarn bmodern
It will create two bundles:
- Modern bundle targeting modern browsers that support ES modules
- and legacy bundle targeting older browsers that do not
For more details see documentation
We use Airbnb config to keep our code clean, fast, readable and usable. Use following command to check if new code have code-style issues before push.
yarn lint