Git Product home page Git Product logo

simple-crud-api's Introduction

RS School - NodeJS Course - 2021 Q4

Task 3. Simple CRUD API

About

CRUD API application using in-memory database and builded on pure Node.js

How to install

  • Install Node.js 16.13.0 or higher
  • Clone this repository
  • Switch to task_03_simple_crud_api branch
  • Install dependencies by command npm i

How to use and run tests

  • Command string for start HTTP server:
    • in development mode: npm run start:dev
    • in production mode: npm run start:prod
  • HTTP server will start on the port defined in the .env file as variable PORT
  • Command string for tests:
    • run tests: npm run test
    • run tests in watch mode: npm run test:watch

Supported routes and HTTP-methods

API path /person:

  • GET /person or /person/${personId} should return all persons or person with corresponding personId
  • POST /person is used to create record about new person and store it in database
  • PUT /person/${personId} is used to update record about existing person
  • DELETE /person/${personId} is used to delete record about existing person from database

Entity interface

Persons are stored as objects that have following properties:

  • id — unique identifier (string, uuid) generated on server side
  • name — person's name (string, required)
  • age — person's age (number, required)
  • hobbies — person's hobbies (array of strings or empty array, required)

Developer environment and instruments

  • Node 16.13.0
  • Npm 8.1.0
  • Webpack 5.64.4
  • Jest 27.3.1
  • Supertest 6.1.6
  • ESLint 8.3.0

simple-crud-api's People

Contributors

igorbarbashov avatar

Watchers

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