Skip to content

Repository files navigation

Home Library Service

Prerequisites

Installation

  1. Clone the repository:
git clone https://github.com/seygorin/nodejs2024Q3-service
cd nodejs2024Q3-service
  1. Change .env file in the root directory if you want to change the default port or database credentials.

Running Application

Using Docker (Recommended)

  1. Build and start containers:
npm run docker:build  # Build containers
npm run docker:up     # Start containers and wait a bit
  1. View logs:
npm run docker:logs
  1. Access services:
  1. Stop application:
npm run docker:down

Using Local Environment

  1. Install dependencies:
npm install
  1. Start the application:
npm run start        # Production mode
npm run start:dev    # Development mode with watch

Database Management

Access and manage database using Prisma Studio:

npm run prisma:studio

Generate Prisma client after schema changes:

npm run prisma:generate

Testing

Run tests:

npm run test         # Run all tests without authorization

Code Quality

Format and lint code:

npm run format  # Format code using Prettier
npm run lint    # Lint and auto-fix using ESLint

Security

Scan for vulnerabilities:

npm run scan

API Documentation

After starting the application, you can explore the API documentation:

Docker Image

The application image is available on Docker Hub:

docker pull seygorin/nodejs2024q3:latest

Or by link.

About

Simple API for Home Library App with authorization

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages