Bu API Kullanıcı Auth işlemlerini, kullanıcıların birbirlerine arkadaşlık isteği gönderme işlemlerini, AWS S3 ve AWS SNS servislerinin kullanımını, Middleware kullanımını ve Mocha ile Unit Test yazımını içerir.
Öncelikle Bilgisayarınıza MongoDB kurmalısınız.
https://www.mongodb.com/try/download/compass
https://www.mongodb.com/try/download/community
Bilgisayarınıza uygun olan işletim sistemini seçerek indirme ve kurulum işlemlerini tamamlayınız.Kuruluma Node.js kurarak devam ediyoruz.
https://nodejs.org/en/download
Bilgisayarınıza uygun olan işletim sistemini seçerek indirme ve kurulum işlemlerini tamamlayınız.Projeyi başlatmak için gerekli komut
npm install
npm startMocha ile Testi başlatmak için gerekli komut
npm test POST /user/register| Parametre | Tip | Açıklama |
|---|---|---|
firstName |
string |
Gerekli |
lastName |
string |
Gerekli |
phone_number |
string |
Gerekli |
email |
string |
Gerekli |
password |
string |
Gerekli |
POST /user/login| Parametre | Tip | Açıklama |
|---|---|---|
email |
string |
Gerekli |
password |
string |
Gerekli |
GET /user/users GET /user/user/{id} POST /user/add-friend/{id}| Parametre | Tip | Açıklama |
|---|---|---|
Authorization : Bearer {token} |
string |
Gerekli |
{id} parametresi isteği gönderilen kullanıcın idsine eşittir.
POST /user/accept/{id}{id} parametresi isteği gönderilen kullanıcın idsine eşittir.
| Parametre | Tip | Açıklama |
|---|---|---|
Authorization : Bearer {token} |
string |
Gerekli |
POST /user/reject/{id}{id} parametresi isteği gönderilen kullanıcın idsine eşittir.
| Parametre | Tip | Açıklama |
|---|---|---|
Authorization : Bearer {token} |
string |
Gerekli |
POST /post/newpost| Parametre | Tip | Açıklama |
|---|---|---|
Authorization : Bearer {token} |
string |
Gerekli |
description |
string |
Gerekli |
image |
string |
Optional Bu parametre form-data içerisinde "image" parametresi ile ve file olarak gönderilmelidir. |
GET /post/posts GET /post/posts/{id} GET /post/posts/user/{id}Node, Express, AWS S3, AWS SNS, MongoDB, Mocha
This API includes User Auth operations, user friend requests to each other, use of AWS S3 and AWS SNS services, use of Middleware, and Unit Test writing with Mocha.
You must install MongoDB on the user's computer.
https://www.mongodb.com/try/download/compass
https://www.mongodb.com/try/download/community
Complete the download and installation processes by selecting the operating system suitable for your computer.We continue the installation by installing Node.js.
https://nodejs.org/en/download
Complete the download and installation processes by selecting the operating system suitable for your computer.Required command to start the project
npm install
npm startRequired to start Test with Mochakomut
npm test POST /user/register| Parameter | Type | Description |
|---|---|---|
firstName |
string |
required |
lastName |
string |
required |
phone_number |
string |
required |
email |
string |
required |
password |
string |
required |
POST /user/login| Parameter | Type | Description |
|---|---|---|
email |
string |
required |
password |
string |
required |
GET /user/users GET /user/user/{id} POST /user/add-friend/{id}| Parameter | Type | Description |
|---|---|---|
Authorization : Bearer {token} |
string |
required |
{id} parameter is equal to the id of the requesting user.
POST /user/accept/{id}{id} parameter is equal to the id of the requesting user.
| Parameter | Type | Description |
|---|---|---|
Authorization : Bearer {token} |
string |
required |
POST /user/reject/{id}{id} parameter is equal to the id of the requesting user.
| Parameter | Type | Description |
|---|---|---|
Authorization : Bearer {token} |
string |
required |
POST /post/newpost| Parameter | Type | Description |
|---|---|---|
Authorization : Bearer {token} |
string |
required |
description |
string |
required |
image |
string |
Optional This parameter should be sent in form-data with the "image" parameter and as a file. |
GET /post/posts GET /post/posts/{id} GET /post/posts/user/{id}Node, Express, AWS S3, AWS SNS, MongoDB, Mocha




