The back contains our controller, roots, and API. We have a db directory with our connection and seed files. The front-end communications with our back-end to manipulate functionality on our API. We also used Postman to make our Post method.
You can make request to any of the routes below and get back either specific or multiple JSON objects.
For Example Example API call
a GET request to sixteen-bars.herokuapp.com/api/poems would return all JSON objects for poems.
| PATH | METHOD | USE |
|---|---|---|
| /api/poems/ | POST | Posting a new Poem |
| /api/poems/ | GET | Get all Poems |
| /api/poems/:id | GET | Shows individual Poem |
| /api/poems/:id | DELETE | Deletes individual Poem |
| /api/poems/:id | PUT | Edits individual Poem |
These routes are implented in the "addingPassportToBackend" branch but not yet implented into master
| PATH | METHOD | USE |
|---|---|---|
| /auth/facebook | GET | Passport-Facebook auth |
| /auth/facebook/callback | GET | callback after auth |
- Passport-facebook - For authentication via Facebook.
- Method-override - To give us access to restful methods(more than just GET AND POST).
- BodyParser - To allow the api to recieve form data.
- Cors - Resolved issue with the angualr front-end pulling data, Not comepletey sure of the extent of what it's doing.
- Authentication with facebook via Passport is not functional.
#Front-end repository Project 3 FrontEnd