Skip to content

Latest commit

 

History

History
67 lines (46 loc) · 1.8 KB

File metadata and controls

67 lines (46 loc) · 1.8 KB

Recommender Frontend

This is the frontend of the Weather-Based Recommender application made with React. Before running, make sure you have generated a .env.local -file, instructions given in the README.md.

Instructions

# Install dependencies
$ npm install

# Run the app in the development mode
$ npm start

Runs the app in the development mode. Open http:https://localhost:3000 to view it in your browser.

The page will reload when you make changes. You may also see any lint errors in the console.

Tests

# Launches the test runner in the interactive watch mode
$ npm test

# Launches tests without the interactive watch mode
$ CI=true npm test

# Run the code validators
$ npm run lint

# Fix most of the linting issues
$ npm run lint -- --fix

See the section about running tests for more information.

Cypress

For the Cypress tests you need to have the frontend running locally. API-calls to the backend are intercepted and mock-data is provided so backend is not necessary.

# Launches the test runner in a browser window
$ npm run cypress:open

# Launches tests in terminal window
$ npx cypress run

Building

# Builds the app for production to the `build` folder.
$ npm run build

It correctly bundles React in production mode and optimizes the build for the best performance. The build is minified and the filenames include the hashes. Your app is ready to be deployed!

See the section about deployment for more information.

Docker

# Builds Docker image
$ `docker build -t recommender-frontend .`

# Run Docker container from image
$ `docker run -p 3000:3000 recommender-frontend`