All Projects → vitaly-t → Pg Promise Demo

vitaly-t / Pg Promise Demo

👓 Advanced example of using pg-promise

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to Pg Promise Demo

Great Big Example Application
A full-stack example app built with JHipster, Spring Boot, Kotlin, Angular 4, ngrx, and Webpack
Stars: ✭ 899 (+274.58%)
Mutual labels:  postgresql, demo
Smoothscrollanimations
Demo of a tutorial on how to add smooth page scrolling with an inner image animation
Stars: ✭ 238 (-0.83%)
Mutual labels:  demo
Scany
Library for scanning data from a database into Go structs and more
Stars: ✭ 228 (-5%)
Mutual labels:  postgresql
Sequelize Auto Migrations
Migration generator && runner for sequelize
Stars: ✭ 233 (-2.92%)
Mutual labels:  postgresql
Datmusic
Search and download free music from VK.
Stars: ✭ 230 (-4.17%)
Mutual labels:  demo
Open model zoo
Pre-trained Deep Learning models and demos (high quality and extremely fast)
Stars: ✭ 2,925 (+1118.75%)
Mutual labels:  demo
Magento React Native
React Native mobile app for Magento 2.x
Stars: ✭ 229 (-4.58%)
Mutual labels:  demo
Chain
链喵 CMDB 本项目已停止开发!因长时间未对代码进行维护,可能会造成项目在不同环境上无法部署、运行BUG等问题,请知晓!项目仅供参考!
Stars: ✭ 240 (+0%)
Mutual labels:  demo
Postgresql Portable
Portable version of the PostgreSQL Database Server, for Windows
Stars: ✭ 237 (-1.25%)
Mutual labels:  postgresql
Massive Js
A data mapper for Node.js and PostgreSQL.
Stars: ✭ 2,521 (+950.42%)
Mutual labels:  postgresql
Storagetapper
StorageTapper is a scalable realtime MySQL change data streaming, logical backup and logical replication service
Stars: ✭ 232 (-3.33%)
Mutual labels:  postgresql
Mobilitydb
MobilityDB is a geospatial trajectory data management & analysis platform, built on PostgreSQL and PostGIS.
Stars: ✭ 229 (-4.58%)
Mutual labels:  postgresql
Pguri
uri type for PostgreSQL
Stars: ✭ 235 (-2.08%)
Mutual labels:  postgresql
Pony
Pony Object Relational Mapper
Stars: ✭ 2,762 (+1050.83%)
Mutual labels:  postgresql
React Native demo
react-native实现网易新闻和美团,实现大部分页面。使用最新的react-navigation等组件,同时支持安卓和iOS设备。
Stars: ✭ 237 (-1.25%)
Mutual labels:  demo
Hsweb Demo
2.x版本演示项目
Stars: ✭ 229 (-4.58%)
Mutual labels:  demo
Devops Bash Tools
550+ DevOps Bash Scripts - AWS, GCP, Kubernetes, Kafka, Docker, APIs, Hadoop, SQL, PostgreSQL, MySQL, Hive, Impala, Travis CI, Jenkins, Concourse, GitHub, GitLab, BitBucket, Azure DevOps, TeamCity, Spotify, MP3, LDAP, Code/Build Linting, pkg mgmt for Linux, Mac, Python, Perl, Ruby, NodeJS, Golang, Advanced dotfiles: .bashrc, .vimrc, .gitconfig, .screenrc, .tmux.conf, .psqlrc ...
Stars: ✭ 226 (-5.83%)
Mutual labels:  postgresql
Django Migration Linter
🚀 Detect backward incompatible migrations for your django project
Stars: ✭ 231 (-3.75%)
Mutual labels:  postgresql
Tds fdw
A PostgreSQL foreign data wrapper to connect to TDS databases (Sybase and Microsoft SQL Server)
Stars: ✭ 238 (-0.83%)
Mutual labels:  postgresql
Tinysynth
A drums looper made with React and the WebAudio API
Stars: ✭ 238 (-0.83%)
Mutual labels:  demo

pg-promise-demo

This is an advanced demo of the best practices of using pg-promise, and managing your database architecture.

It shows how to organize an enterprise-level database application, with consideration for ever-growing complexity of the database and queries.

The demo focuses on the following:

  • The best way to organize your database module
  • Use of the Repository pattern for your database
  • Efficient use of queries via external SQL files
  • Query monitoring and error diagnostics

The demo includes two separate implementations, with identical functionality:

Each uses a basic HTTP service to let you quickly test db calls in a browser. Do not however reuse any of the HTTP-service code, it is over-simplified, for the test, not for you to copy. The demo focus is on the database layer only.

Installing & Running

You can either clone it or install via $ npm install pg-promise-demo.

This demo is here mostly for you to browse through its source code, understand its structure and the overall approach. It is also simple enough that running it isn't really necessary.

However, if you do want to run this application locally, you need to build and and run it according to the type of implementation that you are interested in. See details on the corresponding pages: JavaScript or TypeScript.

Once the application is up and running, you can fire away URL commands in a browser, as per the web API that's implemented, while watching what's happening in:

  • the console output (make sure you have NODE_ENV=development)
  • errors log - file db/errors.log

The application implements two tables: users->products as one-to-many. Once the app is running, you should create and populate those as the very first commands:

/users/create
/users/init
/products/create

After that see other supported API commands in the code:

/users/empty
/users/drop
/users/find/:id
/users/remove/:id
/users/all
/users/total

/products/drop
/products/empty
/products/add/:userId/:name
/products/find/:userId/:name
/products/remove/:id
/products/all
/products/total
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].