-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CRUD API #1
Open
Ihar-dev
wants to merge
20
commits into
main
Choose a base branch
from
develop
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Basic Scope
+10 The repository with the application contains a Readme.md file containing detailed instructions for installing, running and using the application
+10 GET api/users implemented properly
+10 GET api/users/${userId} implemented properly
+10 POST api/users implemented properly
+10 PUT api/users/{userId} implemented properly
+10 DELETE api/users/${userId} implemented properly
+6 Users are stored in the form described in the technical requirements
+6 Value of port on which application is running is stored in .env file
Advanced Scope
+30 Task implemented on Typescript
+10 Processing of requests to non-existing endpoints implemented properly
+10 Errors on the server side that occur during the processing of a request should be handled and processed properly
+10 Development mode: npm script start:dev implemented properly
+10 Production mode: npm script start:prod implemented properly
Hacker Scope
+30 There are tests for API (not less than 3 scenarios)
+30 There is horizontal scaling for application with a load balancer
Use your terminal command line interface
"git clone https://github.com/Ihar-dev/CRUD-API.git" or
"git clone git@github.com:Ihar-dev/CRUD-API.git"
then
"cd CRUD-API"
"git checkout develop"
"npm i"
"npm run start:prod" to run the app in production mode with nodemon
"npm run start:dev" to run the app in development mode with nodemon
"npm run start:multi" to run the app in multi mode with nodemon
"npm run start" to run the app with node
then
use Postman, VS Code Thunder Client or Front-end application
GET method "localhost:4000/api/users" Gets All Users
GET method "localhost:4000/api/users/:userId" Gets Single User
POST method "localhost:4000/api/users" Creates a User
PUT method "localhost:4000/api/users/:userId" Updates a User
DELETE method "localhost:4000/api/users/:userId" Deletes a User
Users are stored as objects that have following properties:
id — unique identifier (string, uuid) generated on server side
username — user's name (string, required)
age — user's age (number, required)
hobbies — user's hobbies (array of strings or empty array, required)