Skip to content

mjhea0/node-postgres-todo

Folders and files

NameName
Last commit message
Last commit date
Feb 12, 2015
Sep 26, 2016
Sep 26, 2016
Sep 26, 2016
Sep 26, 2016
Sep 13, 2015
Sep 26, 2016
Sep 26, 2016
Sep 26, 2016
Sep 26, 2016
Oct 5, 2015

Repository files navigation

PostgreSQL and NodeJS

Check out the blog post >> http://mherman.org/blog/2015/02/12/postgresql-and-nodejs

This is a basic single page application built with Node, Express, Angular, and PostgreSQL.

Quick Start

  1. Clone the repo
  2. Install dependencies: npm install
  3. Start your Postgres server and create a database called "todo"
  4. Create the database tables: node server/models/database.js
  5. Start the server: $ npm start

Tests

This comes with a load test using Apache Bench that by default exercises the API endpoint for the /api/v1/todos service:

sh tests/load-test.sh

Using this load test it is possible to verify several things:

  • that the database is using as many connections as expected (it polls PostgreSQL for the number of active connections while it runs)
  • the performance of the combined system under different loads

See the comments in the script for more information.