Written in nodejs
npm i
npn run start
docker run -d -it --name forum-app fox0430/forum-app
npm test
/create
Request
| Name | Type |
|---|---|
| UserName | String |
| Password | String |
Example
{UserName: 'user', Password: "password"}
Responce
| Name | Type |
|---|---|
| Message | String |
| Token | String |
Example
{
"Message": "Login success",
"Token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoiNWYyMmZkZDVlNThlNmUyYWZiZDc0MTk1IiwiaWF0IjoxNTk2MTI4NzI1LCJleHAiOjE1OTYyMTUxMjV9E4DcvxP9u4Vrnjzkw83jcoWVqFQ6YpC71snjauRn18Y"
}
/login
Request
| Name | Type |
|---|---|
| UserName | String |
| Password | String |
Example
{UserName: "user", Password: "password"}
Responce
Example
{
Message: 'Login success',
Token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoiNWYyMmZkZDVlNThlNmUyYWZiZDc0MTk1IiwiaWF0IjoxNTk2MTI4NzI1LCJleHAiOjE1OTYyMTUxMjV9E4DcvxP9u4Vrnjzkw83jcoWVqFQ6YpC71snjauRn18Y'
}
| Name | Type |
|---|---|
| Message | String |
| Token | String |
/post
Request
! Need toke in headers
| Name | Type |
|---|---|
| Message | String |
| S3Url | String |
Example
{Message "test", "S3Url": "https://example.com"}
Responce
| Name | Type |
|---|---|
| Message | String |
Example
{Message: "Success"}
/get
Responce
| Name | Type | Description |
|---|---|---|
| Contents | String | Array |
Constent
| Name | Type |
|---|---|
| UserID | String |
| UserName | String |
| Message | String |
| S3Url | String |
| Timestamp | String |
Responce example
[{"UserID":"5f22fc430dec2427d9904474", "UserName": "testuser", "Message":"test", "S3Url": "https://exmaple.com", "Timestamp":"2020-07-30T16:58:43.180Z"}]
Content type
Image
Digest
Size
364.9 MB
Last updated
about 6 years ago
docker pull fox0430/forum-app