Added postgres DB, models. Updated services for ansync DB operations, etc
This commit is contained in:
36
README.md
Normal file
36
README.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# generic_typescript_server
|
||||
|
||||
Express + TypeScript REST API with PostgreSQL.
|
||||
|
||||
## Setup
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
npm install
|
||||
```
|
||||
|
||||
## Database
|
||||
|
||||
Start Postgres:
|
||||
|
||||
```bash
|
||||
npm run db:up
|
||||
```
|
||||
|
||||
Run migrations:
|
||||
|
||||
```bash
|
||||
npm run db:migrate
|
||||
```
|
||||
|
||||
Stop Postgres:
|
||||
|
||||
```bash
|
||||
npm run db:down
|
||||
```
|
||||
|
||||
## Dev server
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
Reference in New Issue
Block a user