A super simple file based "Popular Microblogging Website" clone
- get
/timeline
- Returns all the Chirps
- Example response:
[{id: 1, username: 'Foo', body: 'Bar', favourites: 10}]
- post
/create-chirp
- Creates a new Chirp
- Example request:
{username: 'Foo', body: 'Bar'}
- favourite
/favourite
- Favourites a chirp
- Example request:
{id: 10}
- Docker
- Docker Compose
make test
make serve
This runs the Chirper API on port 4567
The chirp file will be prepopulated with the following Chirps:
[
{
"id": 0,
"username": "Cats4Lyf",
"body": "Cats are great",
"favourites": 0
},
{
"id": 1,
"username": "Dogs4Eva",
"body": "All dogs are good dogs",
"favourites": 0
}
]