Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/hi-shekhar/node_pg_knex_crud

A crud application using node.js, Postgres, Knex
https://github.com/hi-shekhar/node_pg_knex_crud

crud-application expressjs jsonschema jsonschema-validator knex knexjs-nodejs-db-migration mocha-chai nodejs postgresql swagger swagger-ui typescript

Last synced: 8 days ago
JSON representation

A crud application using node.js, Postgres, Knex

Awesome Lists containing this project

README

        

# Node PG Knex CRUD

![Node PG Knex CRUD Screen Shot](./assets/homepage.png)

The Application perform the simple CRUD operation.

This application present simple demonstration about the:
1. Usage of Knex
2. Usage of Swagger
3. Usage of JSON Schema Validation
4. Usage of Unit Testing

## Built With
1. Node.js
2. Postgres SQL
3. Knex
4. Swagger

## Installation

1. Clone the repo
```sh
git clone https://github.com/shekbruce/node_pg_knex_crud.git
```
2. Install NPM packages
```sh
npm install
```

## Running the application

1. Create .env file and add below enironment variables
* PORT
* DB_CLIENT
* DB_HOST
* DB_PORT
* DB_USER
* DB_PASSWORD
* DB_NAME
2. ```sh
npm run dev-start
```
3. Go to http://localhost:PORT/

## Running the the test
```sh
npm run test
```