- Create a bin (gives you an end point)
- Log requests made to the bin
- Display the last 20 requests made to the bin
- Bins are automatically deleted after 48 hours
- Each bin has a limit of 20 requests (FIFO)
- Database in MongoDB
- 1 collection
- each bin is a document
- each bin has a list of requests
bin: {
binId: string,
created_at: timestamp,
requests: [
{
method: string,
host: string,
path: string,
created: timestamp,
parameters: {},
headers: {},
body: string,
},
{
...
}
]
}
- Testing
- Tests for the backend
- MongoDB
- One collection for all bins
- Each bin is a document
- Each document has an array of requests
- Figure out how to add and slice at the same time
- Integrate Mongo with what's working already
- API: Abtract out the data storage part first into its own package
- Then swap mongo in for that
- Frontend
- Look at templating in Go
- Create template for the various pages
- Deployment
- Automatic deletion (cron job)