A simple repo to demo use of data from postgresql to plot bar charts using D3.js with a rest api using express.js
NodeJS runs the server-side of the app. PostgreSQL is used for storing population data to be displayed on graphs. pg-promise talks to the database
1. pg-promise
2. express.js
3. d3.js
Make sure you initialize PostgreSQL before running.
- Refer to Detailed installation guides to set up a PostgreSQL instance.
- Run sample seeding script on your PostgreSQL server
- Change config to point to your PostgreSQL server
git clone https://github.com/yosiasz/d3-node-express-postgresql.git
cd d3-node-express-postgresql/
npm install -g nodemon
npm install
This will use node to launch the server:
npm start
Leave the server running, and now you can access http://localhost:5000/.