Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devaungphyo/express-ts-postgresql
REST api using Typescript, NodeJS, ExpressJs , Postgresql with Prisma ORM and MVC architecture. zod used for schema validation
https://github.com/devaungphyo/express-ts-postgresql
drizzle-orm expressjs jsonwebtoken mvc-architecture nodejs postgresql typescript zod
Last synced: 2 days ago
JSON representation
REST api using Typescript, NodeJS, ExpressJs , Postgresql with Prisma ORM and MVC architecture. zod used for schema validation
- Host: GitHub
- URL: https://github.com/devaungphyo/express-ts-postgresql
- Owner: devaungphyo
- Created: 2024-03-10T02:14:54.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-04-12T06:06:18.000Z (7 months ago)
- Last Synced: 2024-10-27T13:41:53.998Z (18 days ago)
- Topics: drizzle-orm, expressjs, jsonwebtoken, mvc-architecture, nodejs, postgresql, typescript, zod
- Language: TypeScript
- Homepage:
- Size: 61.5 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Features
- Get all users
- Create new user (register)
- Update user email and username
- Delete user### Prerequisites
**Node version 20.x**
### Cloning the repository
```shell
git clone https://github.com/aungpyaephyo1412/express-ts-postgresql.git
```### Install packages
```shell
pnpm i
pnpm migrate:generate #model migration generator cli
pnpm migrate:push #model migration to postgres
pnpm migrate:drop #drop migration files
```### Setup Postgresql DB URL
In `.env`:
```.dotenv
PORT=*******
API_VERSION=***********
TOKEN_SECRET = **************************
POSTGRES_DB_URL = *****************************
```### Start the index
```shell
pnpm dev
```## Available commands
Running commands with npm `pnpm [command]`
| command | description |
| :------------------ | :---------------------------- |
| `dev` | Starts a development |
| `build` | Build the api |
| `format` | Code format with prettier |
| `migrate:generate` | model migration generator cli |
| `migrate:push` | model migration to postgres |
| `pnpm migrate:drop` | drop migration files |