Skip to content

Latest commit

 

History

History

app-expenses-tracker-hono

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Expenses Tracker w/Hono

A personal expenses tracking application built with Hono, Bun, and Turso.

Getting Started

Create a turso database.

turso db create <db-name>

Get the database credentials:

# db url
turso db show --url <db-name>

# authentication token
turso db tokens create <db-name>

Rename .env.example to .env and update the database credentials with the values obtained above.

TURSO_DATABASE_URL=
TURSO_AUTH_TOKEN=

Running the project

To install dependencies:

bun install

To run:

bun run dev

open http://localhost:3000

Sending Requests

Add a new expense:

curl "http://127.0.0.1:3000/records" \
  -X POST \
  -H 'Content-Type: application/json' \
  -d '{"ammount": 200,"information": "Bought something nice!"}'

Get all expenses:

curl "http://127.0.0.1:3000/records"