Skip to content

VS-Lucas/V-Projects-API

Repository files navigation

V-Projects API

Description

This is an API project built with NestJS and Prisma.

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/V-Projects-API.git
    cd v-projects-api
  2. Install dependencies:

    pnpm install

Environment Variables

Before starting the project, set up the environment variables. Create a .env file in the root of the project and include the following:

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

Populating the Database

  1. To reset and seed the database, execute:

    npx prisma migrate reset

Running the Project

To start the project, use the following command in the terminal from the project's root directory:

pnpm run start

Hint: To accelerate the development process (20 times faster), use the SWC builder by adding the -b swc flag to the start script, like this:

pnpm run start -- -b swc

To enable file-watching for automatic restarts on changes, use the following command:

pnpm run start:dev

Documentation

Access the project documentation at:

http://localhost:3000/api

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published