Git Product home page Git Product logo

basic-crud-operations's Introduction

basic-crud-operations

git clone https://github.com/PavalEscoba/basic-crud-operations.git
  • After you clone it please:
    • go to a cloned repo
    • switch to develompent branch
    • install all dependencies
cd basic-crud-operations 
git checkout development
npm i
  • After all dependencies are intalled you can start project with following command:
start:dev

PLEASE update index.js in the following way:

  • On the line 116 in index.js remove this code - with ${id} - Otherwise application will crush on start.

  • On the line 119 uncomment notFound() function.

I hope for your kind understanding. (Досадная опечатка 😫)

  • Then you can check the functionality using Postman or any other Rest API Client (for example Thunder Client extension for VS Code)

  • I provided test data in data/users.js. You can check the task using it.

For example:

GET http://localhost:4000/api/users/40bdb15b-79e4-4e04-8356-d485bfc549bf 

Must return:

{
  "id": "40bdb15b-79e4-4e04-8356-d485bfc549bf",
  "username": "Bob",
  "age": 47,
  "hobbies": [
    "football",
    "calligraphy"
  ]
}
POST http://localhost:4000/api/users  

With this user object:

{
  "username": "Pam Beesly",
  "age": 26,
  "hobbies": [
    "Painting",
    "TV Shows",
    "The Office"
  ]
}

Must update db (make sure with GET query) and must return the same object.

`DELETE` http://localhost:4000/api/users/1395e6cd-463a-4415-a315-b56ec1d74117

Must delete a user. You can check it with GET query.

Other functionality is not implemented.

basic-crud-operations's People

Contributors

pmetlitsky avatar pavalescoba 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.