Code Monkey home page Code Monkey logo

students-crud's Introduction

Quality gate

REST API students application

This is a CRUD application for student's info

The Postgresql database and Sonarqube are contained within the docker-compose.yml file

Pre-requisites

  • Docker
  • NodeJs

Install packages

npm install

Set-up docker-compose environment

docker-compose up -d

Set-up prisma

cd src && npx prisma generate && npx prisma migrate dev --name init

Run the tests

npm run test

Run the app

npm start

REST API

/api/students

  • GET : Get all students

    GET request:

      http://localhost:4000/api/students
    

    Example output:

      [{"cedula":"1001636548","name":"Juan Camilo","email":"[email protected]","phone":"3203232323","career":"Ing sistemas"},{"cedula":"1001639741","name":"Juan Pablo","email":"[email protected]","phone":"323256245","career":"Ing química"}]
    
  • POST : Create a new student

    POST request:

      http://localhost:4000/api/students
    

    Body

      {
      "cedula": "1001519284",
      "name": "Pablo Lopez Rosales",
      "email": "[email protected]",
      "phone": "42423254232",
      "career": "Ing industrial"
      }
    
  • PUT : Update a specific student

    Put request

     http://localhost:4000/api/students
    

    Updating name and email

    Body

     {
     "cedula": "1001519284",
     "name": "Pablo Lopez Yepes Bedoya",
     "email": "[email protected]",
     "phone": "42423254232",
     "career": "Ing industrial"
     }
    
  • DELETE : Delete a specific student

    Delete request

     http://localhost:4000/api/students
    

    Body

     {
     "cedula": "1001519284"
     }
    

students-crud's People

Contributors

bakkym avatar aranzaleso 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.