Skip to content

Latest commit

 

History

History
78 lines (60 loc) · 2.04 KB

PROJECT_DOCS.md

File metadata and controls

78 lines (60 loc) · 2.04 KB

Table of contents

Initial project setup

Make sure to install the dependencies and run project with node v18

# npm
nvm use 18
npm install

Runing a development Server

Start the development server on http://localhost:3000

npm run dev

Running a production build

Build the application for production:

npm run build

Locally preview production build:

npm run preview

Extending tailwindcss config

Theme configuration - Tailwind CSS

./tailwind.config.js

    },
    extend: {
        ...
    },
},

Generating and using axios client with request methods and models based on apiDoc

Run a command, that generates an axios client and ts models based on the api schema

npm run api

Set API BASE URL for the generated client or uncomment similar lines in ./plugins/common.ts

import { OpenAPI } from '~/apiClient';
OpenAPI.BASE = 'https://interview-test.digital.cz';

Use generated axios api client (and optionally typescript models)

import { UserService, /* SalaryService, TokenService */ } from '~/apiClient';
const items = await UserService.getApiUsersList();

// import type { User } from '~/apiClient';
// const items: User[] = await UserService.getApiUsersList();

Docs

heroicons Docs

Nuxt 3 Docs

Tailwindcss Docs

OpenAPI Typescript Codegen Docs