forked from sf-wdi-25/express_self_api
-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathapiController.js
More file actions
20 lines (19 loc) · 993 Bytes
/
apiController.js
File metadata and controls
20 lines (19 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function index(req, res) {
res.json({
message: 'Welcome to Cliffly!',
documentation_url: 'https://github.com/MaluPalu/express-personal-api/blob/master/DOCUMENTATION.md',
base_url: 'https://evening-beach-72520.herokuapp.com/',
endpoints: [
{method: "GET", path: "/api", description: "Describes all available endpoints"},
{method: "GET", path: "/api/profile", description: "Describes all available endpoints"},
{method: "GET", path: "/api/cliffs", description: "List Cliff jumping specifiations"},
{method: "POST", path: "/api/cliffs", description: "Add Cliff jumping specifiations"},
{method: "PUT", path: "/api/cliffs/:id", description: "Update Cliff jumping specifiations"},
{method: "DELETE", path: "/api/cliffs/:id", description: "Delete Cliff jumping specifiations"},
{method: "GET", path: "/api/cliffs/:id", description: "Individual Cliff jumping specifiations"}
]
});
}
module.exports = {
index: index
}