https://github.com/thutasann/nest-postgres-ecom
nestjs ecommerce api with postgres
https://github.com/thutasann/nest-postgres-ecom
nestjs postgresql typeorm
Last synced: 3 months ago
JSON representation
nestjs ecommerce api with postgres
- Host: GitHub
- URL: https://github.com/thutasann/nest-postgres-ecom
- Owner: thutasann
- Created: 2023-08-17T04:09:38.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-19T20:56:17.000Z (almost 2 years ago)
- Last Synced: 2025-01-09T02:22:32.299Z (5 months ago)
- Topics: nestjs, postgresql, typeorm
- Language: TypeScript
- Homepage:
- Size: 351 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NESTJS POSTGRES ECOMMERCE API
This is the Ecommerce API with Postgresql Database.
## Tech stacks
- Nestjs
- Postgresql
- Typeorm## Available Scripts
### Start the server
```
yarn start:dev
```- Open [http://localhost:3000/api/v1](http://localhost:3000/api/v1) in **Postman** or **Insomnia**
### Creating Migration File
```bash
npm run migration:generate -- db/migrations/
```### Run the Migration
```bash
npm run migration:run
```## Highlighted Learning outcome
- middleware
- guard
- custom decorator
- reflection and metadata
- interceptor## Postgres Comamnds
### Check available Databases
```bash
\l;
```### Establish a Connection With the Desired Database
```bash
\c nest_ecom_db;
```### List All Tables
```bash
\dt+;
```### Retrive/Update
```bash
SELECT * FROM users;
``````bash
UPDATE users
SET roles = '{admin}'
WHERE id = 1;
```