Skip to content

Latest commit

 

History

History
81 lines (61 loc) · 2.38 KB

README.md

File metadata and controls

81 lines (61 loc) · 2.38 KB

eLib-NodeTs

eLib-NodeTs is a simple library management system built with Node.js and TypeScript. This project provides a backend API to manage books, users, and their interactions.

Table of Contents

Features

  • Manage books (add, update, delete, retrieve)
  • User authentication and management
  • Integration with a database (e.g., MongoDB)
  • TypeScript for improved type safety and code quality

Technologies Used

  • Node.js - JavaScript runtime for building server-side applications
  • TypeScript - Superset of JavaScript that compiles to plain JavaScript
  • Express.js - Web framework for Node.js
  • MongoDB - NoSQL database for data storage

Getting Started

To get a local copy up and running, follow these steps:

  1. Clone the repository
    git clone https://github.com/KamolovFarrux2005/eLib-NodeTs.git
    
  2. Change directory
    cd eLib-NodeTs
    
  3. Install the dependencies
    npm install
    
  4. Create a .env file based on the .env.example and configure your environment variables.
  5. Start the application
    npm start

🔗API Endpoints Here are some example endpoints:

  • POST /books - Add a new book
  • GET /books - Retrieve all books
  • GET /books/:id - Retrieve a specific book
  • PUT /books/:id - Update a specific book
  • DELETE /books/:id - Delete a specific book

Usage You can test the API using tools like Postman or Curl. Make sure to set up your server and database before testing the endpoints.

Example Request Here’s an example of how to add a new book using Postman:

  1. Set the request type to POST.
  2. Enter the URL: http://localhost:3000/books
  3. In the body, select raw and choose JSON format, then enter:
{
    "title": "Sample Book",
    "author": "Author Name",
    "publishedYear": 2021
}


**License**
This project is licensed under the MIT License - see the LICENSE file for details.

### Qo'shimchalar
- **API Endpoints**: Har bir endpoint uchun batafsilroq ma'lumot qo'shishingiz mumkin.
- **.env fayli**: .env faylida qanday o'zgaruvchilar bo'lishi kerakligini aniqroq ko'rsatish foydali bo'lishi mumkin.

Agar qo'shimcha savollar yoki o'zgarishlar bo'lsa, iltimos, ayting!