Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Latest commit

 

History

History
41 lines (33 loc) · 1.03 KB

README.md

File metadata and controls

41 lines (33 loc) · 1.03 KB

Next.js

Start the development server.

yarn dev

Build the app for production.

yarn build

Run the built app in production mode.

yarn start

Environment Variables

For development, you should put these variables in a .env.local file. For production a normal .env suffices, but this file needs to be instantiated on build time, otherwise it won't get loaded succesfully. The NEXT_PUBLIC prefix exposes the env var to the whole application, not just the NextJS specific items.

NEXT_PUBLIC_API_ENDPOINT=... # URL of the backend, default should be http://localhost:8080/api

Running linters

While in /frontend run following commands to show style errors

yarn run eslint .
yarn run prettier --check .

Both linters can autofix errors using

yarn run eslint --fix .
yarn run prettier --write .

Linters will only check files in frontend/pages, frontend/public, frontend/styles and frontend/src.
To add more locations update both frontend/.eslintignore and frontend/.prettierignore.