Skip to content

muhrahmatullah/ktor-movie

Repository files navigation

A very simple K-tor based REST API

This repo is other version of my previous golang movie rest API: https://github.com/muhrahmatullah/go_movie

TODO : use database instead of List

Quick Start

clone the repository and open it in your preffered IDE (recommended using intellij)
run the app
check the log and it will show the url with the port
ex: [main] INFO  Application - Responding at http://0.0.0.0:8080

Endpoints

Get All Movies

GET movies

Get Single Movie

GET movie/{id}

Delete Movie

DELETE movie/{id}

Create Movie

POST movie/

# Request sample
{
 	"title": "Mari Pulang",
 	"rating": "5.6",
 	"year": 2019,
 	"actors": [{
 		"name": "Rahmatullah",
 		"age": 22
 	}]
 }

Update Movie

PUT movies/{id}

# Request sample
{
	"title": "Mari Pulang Bersama",
	"rating": "5.6",
	"year": 2019,
	"actors": [{
		"name": "Rahmatullah aka matx",
		"age": 22
	}]
}

Author

Muh Rahmatullah

About

A simple rest api using ktor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages