Ktor Project Link And Setting
Download Project And Start it !
Put Food Images
Create Model - Food
const val BASE_URL =  "http://127.0.0.1:8080/"
data class Food(
    val name : String,
    val description : String ,
    val imagePath : String
){
    companion object{
        val foodList = listOf<Food>(
            Food(
                name = "PorkRice",
                description = "basil minced pork with rice fried egg",
                imagePath = "$BASE_URL/static/food/food1.jpg"
            ),
            Food(
                name = "BBQ Chinese Food",
                description = "bbq grill cooked with hot spicy sichuan pepper sauce is chinese herb",
                imagePath = "$BASE_URL/static/food/food2.jpg"
            ),
            Food(
                name = "French fries",
                description = "crispy french fries with ketchup mayonnaise",
                imagePath = "$BASE_URL/static/food/food3.jpg"
            ),
            Food(
                name = "Vegetable",
                description = "This is Vegetable",
                imagePath = "$BASE_URL/static/food/food4.jpg"
            ),
            Food(
                name = "Noodle",
                description = "Great noodle !!",
                imagePath = "$BASE_URL/static/food/food5.jpg"
            ),
        )
    }
}
Final Start Again To Test Image
example:
http://127.0.0.1:8080/static/food/food2.jpg 
Get Food Image File From GitHub Plz
https://github.com/encorex32268/com.example.anyprojectnamehere
 





 
    
Top comments (0)