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
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
-