#PHN Quality of Life Survey The PHN Quality of Life Survey is an Express-based web application developed for Pharmacy Health Networks Queensland, allowing patients to submit a specialised version of the World Health Organization Quality of Life (WHOQOL) survey online.
It has been developed for ease-of-use and availability, with support for various device types using responsive HTML/CSS technologies. This application is designed to be hosted in a Node.js environment, with a publically-accessible URL.
This application is built using Express.js for data storage and retrieval, along with React for view management on the client-side.
This is a work-in-progress and so is likely to change often.
A sample Webpack configuration based on Christian Alfoni's early implementation. It offers a simple build with React, SASS and deployment in place. This will eventually be replaced with Express.js.
NPM to the rescue. Although there are some requirements: Node.js and bower.
npm install
Webpack has been configured to offer hot-loading of modules, and should work for SCSS, and JS alike (including JSX, for which we're just using the .js
file extension rather than .jsx
). JavaScript language ES2015 is enabled thanks to Babel.
To get started, simply run the script:
npm run dev
A version of the site will be running on http://localhost:8080 if everything goes smoothly.
This example also features some early work on deployment preperation. The following script will run the deployment process, placing the relevant files in ./dist/
.
npm run deploy
This will perform a full compilation by Webpack into sensible bundles, ready for delivery via HTTP. The file ./dist/index.html
(currently static) should will load the app in your browser, but you'll need to use a web server. If you have python installed, you may fire up a light web server within the ./dist
directory and start interacting with the app.
Copyright (c) Patternworks, All rights reserved Unauthorised copying of this file, via any medium is strictly prohibited. Proprietary and confidential. Written by Kashi Samaraweera <[email protected]>, 2016.