Skip to content

ihaback/nest-swagger-api

Repository files navigation

Nest API

Testing out building a simple api with the Nest framework.

Description

This project is a simple API built using the Nest framework. It includes basic CRUD operations for articles and user authentication features. The API uses SQLite for the database, making it easy to set up and prototype.

  • GET, POST, DELETE and PATCH articles
  • Access articles by ID
  • POST Register user
  • Login route to get acces to GET, POST, PATCH, DELETE /users routes
  • Node.js (>= 14.x)
  • npm (>= 6.x)
npm install
# Generate prisma client
npx prisma generate

# Setup the database
npx prisma db push

# Seed the database
npx prisma db seed
# development
npm run start

# watch mode
npm run start:dev

# production mode
npm run start:prod
// users for authenticating towards the /auth/login endpoint
const users = [
  {
    username: "[email protected]",
    email: "password-joe",
  },
  {
    username: "[email protected]",
    email: "password-jane",
  },
];

About

Simple api built with the Nest framework. Uses sqlite for prototyping.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published