Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bitxon/ts-node-express-drizzle

Example: TypeScript | Node.js | Express.js | Drizzle ORM
https://github.com/bitxon/ts-node-express-drizzle

drizzle-kit drizzle-orm expressjs nodejs postgres typescript

Last synced: 2 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# TypeScript Node.js | Express | Drizzle ORM

## Run Application

Run in dev mode (Docker + Drizzle + Nodemon)
```shell
npm run dev
```

Compile and Run in prod mode
```shell
npm run docker:up
```
```shell
npm run build && npm run start
```

## Test application

Create Account

```shell
curl --location 'http://localhost:8080/accounts' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "[email protected]",
"firstName": "Mike",
"lastName": "Brown",
"currency": "USD",
"balance": 100
}'
```

Get All Accounts

```shell
curl --location 'http://localhost:8080/accounts'
```

Get Account By Id

```shell
curl --location 'http://localhost:8080/accounts/1'
```

Transfer Money

```shell
curl --location 'http://localhost:8080/accounts/transfer' \
--header 'Content-Type: application/json' \
--data-raw '{
"senderId": 1,
"recipientId": 2,
"amount": 100
}'
```