Skip to content

A simple web app to enter health data using NodeJS and Postgres

License

Notifications You must be signed in to change notification settings

nicklepickle/health-records-pg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

health-records-pg

health-records-pg is a simple web app using NodeJS and Postrges to store and visualize health records.

Plotty.js is used to plot graphs of the daily records.

This application is not intended to be publicly hosted but assumes a network environment of trusted users.

Not included in this repository is the config.js file at the root of the project. This file contains the credentials used to log in to Postgres as well as session and server settings. Below is an example of what this file should contain. Environment variables can be used in place of hard coded values in this file.

module.exports = {
  database: { // pg connection values
    host: 'localhost',
    user: 'db_user',
    password: 'db_password',
    database: 'health',
    port: 5432
  },
  server: {
    approot: __dirname,
    port:8300
  },
  session: {
    name: 'session', // name of session cookie
    maxAge: 30 * (24 * 60 * 60 * 1000), // 30 days in ms
    key: 'session_secret'
  }
};