Skip to content

Repository files navigation

Express API

This project is a RESTful API built with Node.js, Express, TypeScript, and PostgreSQL. It follows a three-layer architecture and does not use any ORM for database interactions. The API provides endpoints for managing users, products, categories, orders, and carts.

Features

  • User authentication (login, signup)
  • Product management (CRUD operations)
  • Category management
  • Order processing
  • Cart management
  • Database migration and seeding

Technologies Used

  • Node.js
  • Express
  • TypeScript
  • PostgreSQL

Project Structure

express-api
├── src
│   ├── config
│   ├── controllers
│   ├── db
│   ├── interfaces
│   ├── middleware
│   ├── repositories
│   ├── routes
│   ├── services
│   ├── utils
│   ├── app.ts
│   └── server.ts
├── .env.example
├── .gitignore
├── package.json
└── tsconfig.json

Setup Instructions

  1. Clone the repository:

    git clone <repository-url>
    cd express-api
    
  2. Install dependencies:

    npm install
    
  3. Create a .env file based on the .env.example file and configure your database connection.

  4. Create the database:

    npm run create-db
    
  5. Run migrations:

    npm run migrate
    
  6. Seed the database:

    npm run seed
    
  7. Start the server:

    npm run start
    

API Documentation

Refer to the individual controller files for detailed API endpoint documentation.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages