Skip to content

VS-Lucas/LucaStore-API

Repository files navigation

LucaStore API

Description

This is an API project built with NestJS and Prisma. The API manages users, products, catalogs, shopping carts, and orders.

Installation

Prerequisites

Before you begin, you need to have Node.js and pnpm installed. If you don't have Node.js and pnpm installed, follow the instructions below to install them:

  1. Install Node.js:

    Download and install Node.js from the official website.

  2. Install pnpm:

    pnpm installation instructions

Cloning the Repository

  1. Clone the repository:

    git clone https://github.com/VS-Lucas/LucaStore-API.git
    cd lucastore-api
  2. Install dependencies:

    pnpm install

Environment Variables

Before running the project, you need to set up the environment variables. Create a .env file in the root of the project and add the following:

DATABASE_URL="file:./dev.db"
JWT_SECRET="<your_jwt_secret>"

Populating the Database

  1. To reset the database and populate it with seed data, run:

    npx prisma migrate reset

Running the Project

To run the project, you can use the following command in the terminal, while in the project's root directory:

pnpm run start

Hint: To speed up the development process (20 times faster), you can use the SWC builder by passing the -b swc flag to the start script, as follows:

pnpm run start -- -b swc

To watch for changes in your files, you can run the following command to start the application:

pnpm run start:dev

Documentation

To access the project documentation, visit:

http://localhost:3000/api

Contribution

If you wish to contribute to this project, please open a Pull Request or an Issue.

Contact

For questions and suggestions, please contact us via email: lvs3@cin.ufpe.br

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published