docker-compose version >= 1.25.4
Open terminal & go to project root directory and execute the following command
make build
to build the projectmake start
to run the project- Go to http://localhost:3000/
make stop
to stop
- Implement front end
curl -X POST http://localhost:8000/api/reels/ \
-H 'Content-Type: application/json' \
-d @- << EOF
{
"name": "sample 101",
"video": {
"name": "video sample 101",
"standard": "NTSC",
"definition": "HD",
"description": "Description 101",
"start": "00:00:29:05",
"end": "00:01:20:00"
}
}
EOF
{
"code": 0,
"message": "",
"data": {
"id": 69,
"name": "sample 101",
"duration": "00:00:50:25",
"standard": "NTSC",
"definition": "HD",
"clip_videos": [
{
"id": 5,
"name": "video sample 101",
"duration": "00:00:50:25",
"standard": "NTSC",
"definition": "HD",
"description": "Description 101",
"start": "00:00:29:05",
"end": "00:01:20:00"
}
]
}
}
curl -X POST http://localhost:8000/api/reels/69/videos \
-H 'Content-Type: application/json' \
-d @- << EOF
{
"name": "sample",
"standard": "NTSC",
"definition": "HD",
"description": "Description 102",
"start": "00:03:30:10",
"end": "00:04:10:00"
}
EOF
{
"code": 0,
"message": "",
"data": {
"id": 6,
"name": "sample",
"duration": "00:00:39:20",
"standard": "NTSC",
"definition": "HD",
"description": "Description 102",
"start": "00:03:30:10",
"end": "00:04:10:00"
}
}
curl -X POST http://localhost:8000/api/reels/69/videos \
-H 'Content-Type: application/json' \
-d @- << EOF
{
"name": "sample",
"standard": "NTSC",
"definition": "SD",
"description": "Description 103",
"start": "00:03:30:10",
"end": "00:04:10:00"
}
EOF
{
"code": 3,
"message": "Video defination must be HD",
"data": null
}
curl -X DELETE http://localhost:8000/api/reels/69/videos/6
{
"code": 0,
"message": "deleted video",
"data": {
"id": 6
}
}
curl -X GET http://localhost:8000/api/reels
{
"code": 0,
"message": "",
"data": [
{
"id": 67,
"name": "sample",
"duration": "01:01:01:02",
"standard": "NTSC",
"definition": "HD",
"clip_videos": [
{
"id": 1,
"name": "sample",
"duration": "01:01:01:02",
"standard": "NTSC",
"definition": "HD",
"description": "Description 1",
"start": "01:23:49:27",
"end": "02:24:50:29"
}
]
},
{
"id": 69,
"name": "sample 101",
"duration": "00:01:49:16",
"standard": "NTSC",
"definition": "HD",
"clip_videos": [
{
"id": 5,
"name": "video sample 101",
"duration": "00:00:50:25",
"standard": "NTSC",
"definition": "HD",
"description": "Description 101",
"start": "00:00:29:05",
"end": "00:01:20:00"
},
{
"id": 7,
"name": "sample",
"duration": "00:00:58:21",
"standard": "NTSC",
"definition": "HD",
"description": "Description 103",
"start": "00:03:10:10",
"end": "00:04:09:01"
}
]
}
]
}
curl -X GET http://localhost:8000/api/reels/69
{
"code": 0,
"message": "",
"data": {
"id": 69,
"name": "sample 101",
"duration": "00:01:49:16",
"standard": "NTSC",
"definition": "HD",
"clip_videos": [
{
"id": 5,
"name": "video sample 101",
"duration": "00:00:50:25",
"standard": "NTSC",
"definition": "HD",
"description": "Description 101",
"start": "00:00:29:05",
"end": "00:01:20:00"
},
{
"id": 7,
"name": "sample",
"duration": "00:00:58:21",
"standard": "NTSC",
"definition": "HD",
"description": "Description 103",
"start": "00:03:10:10",
"end": "00:04:09:01"
}
]
}
}