     throw Abort.custom(status: .badRequest, message: "Sorry 😱 a terrible error happened here")
 }
 
+//nesting slashes FALLBACK routes
+drop.get("anything", "*") { request in
+    return "Matches anything after /anything"
+}
+
+
+//postname send a json to route
+drop.post("jsonname") { request in
+    guard let name = request.json?["name"]?.string else {
+        throw Abort.badRequest
+    }
+    guard let age = request.json?["age"]?.string else {
+        throw Abort.badRequest
+    }
+    
+    return "Hello, \(name) your age is \(age)!"
+}
+
 //json response
 drop.get("json") { request in
     return try JSON(node: [

do {
    try drop.addProvider(VaporPostgreSQL.Provider.self)
} catch {
    assertionFailure("Error adding provider: \(error)")
}



        ])
}


drop.resource("posts", PostController())

