This is a lightweight Go application that allows you to easily log and record a journal or diary. It contains two endpoints: one for listing the journal for a single day, and one for creating a new entry in the journal.
This was built in 30 minutes, with tests included, using Encore. It took 2 minutes to deploy, including with the database.
Listing all my entries for a specific date:
curl -X GET "http://localhost:4000/logbook/entries/2022-09-08" | jq
{
"Entries": [
{
"Id": 1,
"Time": "2022-09-08T16:25:21.409544Z",
"Text": "I cooked fried eggs this morning. I forgot how much I loved them!"
}
]
}
Create new diary entry:
curl -X POST --data '{"Text":"I cooked fried eggs this morning. I forgot how much I loved them!"}' "http://localhost:4000/logbook/entries"
{
"Id": 6,
"Time": "2022-09-08T16:25:21.409544Z",
"Text": "I cooked fried eggs this morning. I forgot how much I loved them!"
}
brew install [email protected]
brew install encoredev/tap/encore
git clone [email protected]:encoredev/example-app-diary.git
encore auth signup # or encore auth login (if you already have an account)
encore run
encore app create my-diary-app-name
git push origin main
Then head over to https://app.encore.dev to find out your production URL, and off you go into the clouds!
encore test ./...
All contributions are welcome! All we ask is that you adhere to the Code of Conduct