Commands
Install nodejs with version >=18.17.0 and npm (which should come pre-packaged with nodejs)
npm install
: Installs dependencies
Running npm run dev
is the recommended way to start the development server (compiling and serving files over http, automatically refreshing components when their code is updated etc.)
NEXT_PUBLIC_API_URL_PREFIX=http://localhost:5000 npm run dev
: Starts development server
npm run build
: Compiles website into static files, output placed in out/
npm run lint
: Runs a lint on the code to check for errors and warnings
npm run prebuild
: Builds assets required for the build, such as language files
npm audit
: Checks for known vulnerable versions of dependencies
npm outdated
: Shows outdated dependencies
It is recommended to install npm run lint
as a git commit hook
Production
A full description of the production setup can be found in the videoag_infra/production
repository. The repository and/or group might not be visible to you.
tl;dr: Tag the commit that should be published.
The tag needs to start with v
, should be semver and 'newer' than the tag before it. This initiates a pipeline that triggers another pipeline in the production repo which pushes a container image to its container registry. Fluxcd notices the new container and updates the image on all kubernetes pods.
Struktur
Stand: 10.05.2024
-
public/
: Hier werden statische Assets abgelegt -
lang/
: Language files -
src/
-
api/
: Code um mit dem Backend zu kommunizieren -
components/
: Komponenten die entweder wiederverwendet werden oder zu groß sind-
DefaultLayout.tsx
: Das ist die Default "template" in die jede page reingerendert wird
-
-
misc/
: Hilfsfunktionen -
pages/
: Spezielles verzeichnis, jede Datei hier wird vom framework als .html gerendert, die dateinamen werden übernommen-
_app.tsx
: Template in die jede page reingerendert wird -
_document.tsx
: Spezifiziert die Grundstruktur des HTML
-
-
styles/
: CSS Dateien -
types/
: Typescript Typ-Definitionen
-