Skip to content

ALIAKSEI-sl/crud-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple CRUD API

Task is here.

Downloading

git clone {repository URL}

Installing NPM modules

npm install

Running

Run the application in development mode

npm run start:dev

Run tests scenarios for API

npm run test

Run the application in production mode

npm run start:prod

Run cluster mode with default load balancer

npm run start:multi

PORT

Value of port on which the application is running is stored in .env file, it can be changed

API

Implemented endpoint: api/users

GET api/users - to get all users

GET api/users/${userId} - to get user by id (uuid)

POST api/users - to create record about new user and store it in database

PUT api/users/${userId} - to update existing user (all fields required)

DELETE api/users/${userId} - to delete existing user from database

User fields

username — user's name (string, required)

age — user's age (number, required)

hobbies — user's hobbies (array of strings or empty array, required)

Postman

You can use Postman.

About

simple CRUD API: get, post, put, delete

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors