Giter VIP home page Giter VIP logo

crud-typescript-poo's Introduction

CRUD application made in Typescript with object-oriented programming

I cloned the repository, what should I do next?

  • [on console] npm i (to install the dependencies)
  • create a .env file in the project root with this information: DATABASE_URL="file:./dev.db"
  • [on console] npx prisma migrate dev, afterwards, on the console, Prisma will ask for a name for the migration, you can choose one.
  • npm run dev (to run the application)
  • now, you can do the next steps bellow!

How to use this application?

  1. POST http://localhost:8080/users/create Send a JSON in the body of the request containing name, email, password and address. As shown below:
{
    "name": "Igor",
    "email": "[email protected]",
    "password": "yourpass",
    "address": "your address"
}
  1. GET http://localhost:8080/users/findUsers This request will return all users.

3.GET http://localhost:8080/users/getUser/{id} This request will return the user who has an ID equal to the one passed as a parameter in the URL.

  1. PATCH http://localhost:8080/users/updateUser/{id} This request will change the data passed in the body (JSON) of the request, not necessarily all data. Example below:

    {
       "name": "Jhon",
       "email": "[email protected]"
    }   
    

    This action will change the name and email of the user.

  2. DELETE http://localhost:8080/users/deleteUser/{id} This request will delete the user with the ID passed by the database parameter.

crud-typescript-poo's People

Contributors

igormtt avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.