Dank-del / notes-api

Notes API made using NestJS and Prisma

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Notes Server

This project is a TypeScript application built with the NestJS framework. It uses Prisma as an ORM for database management and Jest for testing. The project is managed with npm and follows the coding standards enforced by ESLint and Prettier.

Tech Stack

  • NestJS: A progressive Node.js framework for building efficient, reliable, and scalable server-side applications.
  • TypeScript: A strongly typed superset of JavaScript that adds static types.
  • Prisma: An open-source database ORM.
  • PostgreSQL: A powerful, open source object-relational database

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Node.js
  • pnpm
  • git
  • PostgreSQL database

Installation

  1. Clone the repository:
git clone https://github.com/Dank-del/notes-api.git
  1. Install the dependencies:
pnpm install
  1. Add a .env file to the root of the project with the following contents:
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/notes" # your database url
PORT=3000 # the port the server will run on
JWT_SECRET=secret # the secret used to sign JWTs
  1. Run the Prisma migration to create the database schema:
npx prisma db push

Running the Application

Start the application by running:

pnpm start:dev

The application will be running at http://localhost:3000.

Running the Tests

Run the tests by executing:

pnpm test

Deployment

To build the application for production, run:

pnpm build

This will create a dist directory with the compiled JavaScript files.

API Documentation

The API documentation is available at http://localhost:3000/api.

About

Notes API made using NestJS and Prisma


Languages

Language:TypeScript 96.8%Language:JavaScript 3.2%