Skip to content

Latest commit

 

History

History
80 lines (57 loc) · 2.38 KB

README.md

File metadata and controls

80 lines (57 loc) · 2.38 KB

Ticket system - API 🎫

Prisma Badge Express Badge GitHub issues GitHub forks GitHub PRs

🛠️ Stack

  • PrismaORM - intuitive data model, automated migrations, type-safety, and auto-completion.
  • Express - Fast, unopinionated, minimalist web framework for Node.js

🧞 Commands

Important

Before executing the prisma:dev command you must create the database with the name defined in the .env file

Command Action
$ dev Starts local dev server at localhost:3000.
$ generate:env Generates the .env file with the database connection.
$ prisma:dev Build the database schema.

⚙️ API Reference

Post Register User

  POST /api/register
Parameter Type Description
email string Required. The user's e-mail address.
username string Required. The user's name.
password string Required. The user's password.

Example:

Headers:

  • Content-Type: application/json

Body (raw JSON):

{
  "name": "jdoe",
  "email": "[email protected]",
  "pasword": "password"
}

Get all tickets author user

  GET /api/tickets
Parameter Type Description
api_key string Required. Your API key

Get

  GET /api/tickets/${id}
Parameter Type Description
id string Required. Id of item to fetch