Getting Started
What is MongoDB?
Install / Config
C.R.U.D. Ops
Data Modeling
Database Mgmt
Create, Read, Update and Delete Operations
LAB Instructions: C.R.U.D. Operations on
Sweetscomplete Website
Deploy the "sweetscomplete" website
.
Create a folder "sweetscomplete" off the document root for your webserver
Locate the "sweetscomplete" website files in the Working Files folder for the course
Copy these files and folders into the new website folder
Assign ownership to your webserver user (i.e. www-data) to:
sweetscomplete/captcha
sweetscomplete/Model/*.csv and *.bak
Test and make sure the website is running
.
From your browser: http://localhost/sweetscomplete/
Select "Products" and verify you can scan through the list of products
Import sweetscomplete "Products" data into MongoDB
.
mongoimport -d sweetscomplete -c products --headerline --type csv
--file /path/to/document/root/Model/sweetscomplete_products.csv
Rewrite "Model/Products.php" to use MongoDB instead of a CSV file
.
Look for comments starting with "// ***" for clues
Check the Working Files folder "sweetscomplete.complete/Model/Products.php" for a solution
Test and make sure the website is running
.
From your browser: http://localhost/sweetscomplete/
Select "Products" and verify you can scan through the list of products
Correct any errors as needed
+
o
-