3. Link to the GitHub repository: https://github.com/SEG3125-A/group44-lab6
Lisa Korolyov
- Created the data json files that match the survey questions
- Improved the survey's user interface using Bootstrap
Zechen Zhou
- Implemented the server side to update the data files based on the survey's response
- Made a "submit" button to send survey result to the server
npm install
(no settings for production in this lab unfortunately):
npm start
-
client-side webpage: http://127.0.0.1:3000/survey
-
server-side webpage: http://127.0.0.1:3000/analysis
- Create package.json file
npm init
- Add the following into "scripts": {}
"start": "node js/app.js",
- Add dependencies (install packages)
npm install ejs --save
npm install body-parser --save
npm install express --save
- If place app.js in the project root directory:
Use the command node app to run the app
File package.json:
{
"name": "group44-lab6",
"version": "1.0.0",
"description": "A survey on a website",
"main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"license": "ISC",
}
- If place app.js in a sub-directory: (don't forget to modify the path for "main" and add a property "start" in "scripts")
Use the command npm start to run the app
File package.json:
{
"name": "group44-lab6",
"version": "1.0.0",
"description": "A survey on a website",
"main": "js/app.js",
"scripts": {
"start": "node js/app.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"license": "ISC",
}