Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Sunglasses.io Server

This project has been created by a student at Project Shift, a software engineering fellowship located in Downtown Durham. The work in this repository is wholly of the student based on a sample starter project that can be accessed by looking at the repository that this project forks.
To access this project, fork and clone it from this github repository then "cd" into the project directory and type "npm install" into the terminal. Make sure the necessary dependencies are installed in order to run it properly. Update the hardcoded token on line 160 of server.test.js with the latest "Generated Token" in the console log. You can find that console log and run the tests by typing "mocha test/server.test.js --watch" into the terminal.

If you have any questions about this project or the program in general, visit projectshift.io or email hello@projectshift.io.
This project has been created by a student at Project Shift, a software engineering fellowship located in Downtown Durham. The work in this repository is wholly of the student based on a sample starter project that can be accessed by looking at the repository that this project forks.
22 changes: 22 additions & 0 deletions api/brands.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{
"id": "1",
"name": "Oakley"
},
{
"id": "2",
"name": "Ray Ban"
},
{
"id": "3",
"name": "Levi's"
},
{
"id": "4",
"name": "DKNY"
},
{
"id": "5",
"name": "Burberry"
}
]
101 changes: 101 additions & 0 deletions api/products.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
[
{
"id": "1",
"brandId": "1",
"categoryId": "1",
"name": "Superglasses",
"description": "The best glasses in the world",
"price":150,
"imageUrls":["https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg","https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg","https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg"]
},
{
"id": "2",
"brandId": "1",
"categoryId": "1",
"name": "Black Sunglasses",
"description": "The best glasses in the world",
"price":100,
"imageUrls":["https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg","https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg","https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg"]
},
{
"id": "3",
"brandId": "1",
"categoryId": "1",
"name": "Brown Sunglasses",
"description": "The best glasses in the world",
"price":50,
"imageUrls":["https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg","https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg","https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg"]
},
{
"id": "4",
"brandId": "2",
"categoryId": "2",
"name": "Better glasses",
"description": "The best glasses in the world",
"price":1500,
"imageUrls":["https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg","https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg","https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg"]
},
{
"id": "5",
"brandId": "2",
"categoryId": "2",
"name": "Glasses",
"description": "The most normal glasses in the world",
"price":150,
"imageUrls":["https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg","https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg","https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg"]
},
{
"id": "6",
"brandId": "3",
"categoryId": "3",
"name": "glas",
"description": "Pretty awful glasses",
"price":10,
"imageUrls":["https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg","https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg","https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg"]
},
{
"id": "7",
"brandId": "3",
"categoryId": "3",
"name": "QDogs Glasses",
"description": "They bark",
"price":1500,
"imageUrls":["https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg","https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg","https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg"]
},
{
"id": "8",
"brandId": "4",
"categoryId": "4",
"name": "Coke cans",
"description": "The thickest glasses in the world",
"price":110,
"imageUrls":["https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg","https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg","https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg"]
},
{
"id": "9",
"brandId": "4",
"categoryId": "4",
"name": "Sugar",
"description": "The sweetest glasses in the world",
"price":125,
"imageUrls":["https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg","https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg","https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg"]
},
{
"id": "10",
"brandId": "5",
"categoryId": "5",
"name": "Peanut Butter",
"description": "The stickiest glasses in the world",
"price":103,
"imageUrls":["https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg","https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg","https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg"]
},
{
"id": "11",
"brandId": "5",
"categoryId": "5",
"name": "Habanero",
"description": "The spiciest glasses in the world",
"price":153,
"imageUrls":["https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg","https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg","https://image.shutterstock.com/z/stock-photo-yellow-sunglasses-white-backgound-600820286.jpg"]
}
]
107 changes: 107 additions & 0 deletions api/users.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
[
{
"userId": "1",
"gender": "female",
"cart": [],
"name": {
"title": "mrs",
"first": "susanna",
"last": "richards"
},
"location": {
"street": "2343 herbert road",
"city": "duleek",
"state": "donegal",
"postcode": 38567
},
"email": "susanna.richards@example.com",
"login": {
"username": "yellowleopard753",
"password": "jonjon",
"salt": "eNuMvema",
"md5": "a8be2a69c8c91684588f4e1a29442dd7",
"sha1": "f9a60bbf8b550c10712e470d713784c3ba78a68e",
"sha256": "4dca9535634c102fbadbe62dc5b37cd608f9f3ced9aacf42a5669e5a312690a0"
},
"dob": "1954-10-09 10:47:17",
"registered": "2003-08-03 01:12:24",
"phone": "031-941-6700",
"cell": "081-032-7884",
"picture": {
"large": "https://randomuser.me/api/portraits/women/55.jpg",
"medium": "https://randomuser.me/api/portraits/med/women/55.jpg",
"thumbnail": "https://randomuser.me/api/portraits/thumb/women/55.jpg"
},
"nat": "IE"
},
{
"userId": "2",
"gender": "male",
"cart": [],
"name": {
"title": "mr",
"first": "salvador",
"last": "jordan"
},
"location": {
"street": "9849 valley view ln",
"city": "burkburnett",
"state": "delaware",
"postcode": 78623
},
"email": "salvador.jordan@example.com",
"login": {
"username": "lazywolf342",
"password": "tucker",
"salt": "oSngghny",
"md5": "30079fb24f447efc355585fcd4d97494",
"sha1": "dbeb2d0155dad0de0ab9bbe21c062e260a61d741",
"sha256": "4f9416fa89bfd251e07da3ca0aed4d077a011d6ef7d6ed75e1d439c96d75d2b2"
},
"dob": "1955-07-28 22:32:14",
"registered": "2010-01-10 06:52:31",
"phone": "(944)-261-2164",
"cell": "(888)-556-7285",
"picture": {
"large": "https://randomuser.me/api/portraits/men/4.jpg",
"medium": "https://randomuser.me/api/portraits/med/men/4.jpg",
"thumbnail": "https://randomuser.me/api/portraits/thumb/men/4.jpg"
},
"nat": "US"
},
{
"userId": "3",
"gender": "female",
"cart": [],
"name": {
"title": "mrs",
"first": "natalia",
"last": "ramos"
},
"location": {
"street": "7934 avenida de salamanca",
"city": "madrid",
"state": "aragón",
"postcode": 43314
},
"email": "natalia.ramos@example.com",
"login": {
"username": "greenlion235",
"password": "waters",
"salt": "w10ZFgoO",
"md5": "19f6fb510c58be44b2df1816d88b739d",
"sha1": "18e545aee27156ee6be35596631353a14ee03007",
"sha256": "2b23b25939ece8ba943fe9abcb3074105867c267d122081a2bc6322f935ac809"
},
"dob": "1947-03-05 15:23:07",
"registered": "2004-07-19 02:44:19",
"phone": "903-556-986",
"cell": "696-867-013",
"picture": {
"large": "https://randomuser.me/api/portraits/women/54.jpg",
"medium": "https://randomuser.me/api/portraits/med/women/54.jpg",
"thumbnail": "https://randomuser.me/api/portraits/thumb/women/54.jpg"
},
"nat": "ES"
}
]
Loading