arifwidianto08 / ts-node-express-drizzle

Example: TypeScript | Node.js | Express.js | Drizzle ORM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeScript Node.js | Express | Drizzle ORM

Run Application

Run in dev mode (Docker + Drizzle + Nodemon)

npm run dev

Compile and Run in prod mode

npm run docker:up
npm run build && npm run start

Test application

Create Account
curl --location 'http://localhost:8080/accounts' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "mike@mail.com",
    "firstName": "Mike",
    "lastName": "Brown",
    "currency": "USD",
    "balance": 100
}'
Get All Accounts
curl --location 'http://localhost:8080/accounts'
Get Account By Id
curl --location 'http://localhost:8080/accounts/1'
Transfer Money
curl --location 'http://localhost:8080/accounts/transfer' \
--header 'Content-Type: application/json' \
--data-raw '{
    "senderId": 1,
    "recipientId": 2,
    "amount": 100
}'

About

Example: TypeScript | Node.js | Express.js | Drizzle ORM


Languages

Language:TypeScript 100.0%