Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alex-Manuel #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion bin/www
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var PORT = process.argv[2]&&process.argv[2].slice(-4)
* Get port from environment and store in Express.
*/

var port = normalizePort(process.env.PORT || PORT || '3000');
var port = normalizePort(process.env.PORT || PORT || '4000');
app.set('port', port);

/**
Expand Down
3 changes: 2 additions & 1 deletion configs/mongo-config.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
// export mongodb url
const direccion="mongodb://localhost:27017/[DataEComerce][DataCollection]";
module.exports = direccion;
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ router.get('/filter', function (req, res, next) {
//GET /checkout
router.get('/checkout/:cartId', ensureAuthenticated, function (req, res, next) {
const cartId = req.params.cartId
const frontURL = 'https://zack-ecommerce-reactjs.herokuapp.com'
// const frontURL = 'http://localhost:3000'
//const frontURL = 'https://zack-ecommerce-reactjs.herokuapp.com'
const frontURL = 'http://localhost:3000'

Cart.getCartById(cartId, function (err, c) {
if (err) return next(err)
Expand Down
64 changes: 32 additions & 32 deletions seed/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@ mongoose.connect(mongoConfig, { useNewUrlParser: true, useCreateIndex: true, });
var categories =
[
new Category({
categoryName: 'Basics'
categoryName: 'Basicos'
}),
new Category({
categoryName: 'Blazer'
categoryName: 'Chaqueta'
}),
new Category({
categoryName: 'Knitwear'
categoryName: 'Prendas de punto'
}),
new Category({
categoryName: 'Jeans'
}),
new Category({
categoryName: 'Jackets'
categoryName: 'Campera'
}),
new Category({
categoryName: 'Girl'
categoryName: 'Niña'
}),
new Category({
categoryName: 'Boy'
categoryName: 'Niño'
})
]

Expand All @@ -44,17 +44,17 @@ for (let i = 0; i < categories.length; i++) {
var departments =
[
new Department({
departmentName: 'Women',
categories: 'Basics,Blazer'
departmentName: 'Mujeres',
categories: 'Basicos,Chaqueta'

}),
new Department({
departmentName: 'Men',
categories: 'Knitwear,Jeans,Jackets'
departmentName: 'Varones',
categories: 'Prendas de punto,Jeans,Campera'
}),
new Department({
departmentName: 'Kids',
categories: 'Girl,Boy'
departmentName: 'Niños',
categories: 'Niña,Niño'
})
]

Expand All @@ -77,8 +77,8 @@ var products =
color: 'Gray',
size: 'XS,S,M',
quantity: 10,
department: 'Women',
category: 'Basics',
department: 'Mujeres',
category: 'Basicos',
date: 1581397200000
}),
new Product({
Expand All @@ -90,8 +90,8 @@ var products =
color: 'Black',
size: 'XS,S,XL',
quantity: 15,
department: 'Women',
category: 'Basics',
department: 'Mujeres',
category: 'Basicos',
date: 1597885814264
}),
new Product({
Expand All @@ -103,21 +103,21 @@ var products =
color: 'White',
size: 'XS',
quantity: 90,
department: 'Women',
category: 'Basics',
department: 'Mujeres',
category: 'Basicos',
date: 1581397200000
}),
new Product({
_id: "5bedf55bc14d7822b39d9d4b",
imagePath: 'https://static.zara.net/photos///2018/I/0/1/p/8197/757/093/4/w/1920/8197757093_2_2_1.jpg?ts=1538393944729',
title: 'Belted Plaid Blazer',
description: 'Flowy blazer with lapel collar and long sleeves. Self belt. Chest patch pockets and welt pockets at hip. Front double-breasted button closure.',
title: 'Belted Plaid Chaqueta',
description: 'Flowy Chaqueta with lapel collar and long sleeves. Self belt. Chest patch pockets and welt pockets at hip. Front double-breasted button closure.',
price: 79.99,
color: 'Black',
size: 'S,M,L',
quantity: 4,
department: 'Women',
category: 'Blazer',
department: 'Mujeres',
category: 'Chaqueta',
date: 1581397200000
}),
new Product({
Expand All @@ -129,8 +129,8 @@ var products =
color: 'Orange',
size: 'M,L',
quantity: 5,
department: 'Men',
category: 'Knitwear',
department: 'Varones',
category: 'Prendas de punto',
date: 1597885814264
}),
new Product({
Expand All @@ -142,7 +142,7 @@ var products =
color: 'Dark Blue',
size: 'M,L',
quantity: 80,
department: 'Men',
department: 'Varones',
category: 'Jeans',
date: 1597885814264
}),
Expand All @@ -155,7 +155,7 @@ var products =
color: 'Light Blue',
size: 'XS,S,M',
quantity: 8,
department: 'Men',
department: 'Varones',
category: 'Jeans',
date: 1581397200000
}),
Expand All @@ -168,8 +168,8 @@ var products =
color: 'Brown',
size: 'XS,M,XL',
quantity: 12,
department: 'Men',
category: 'Jackets',
department: 'Varones',
category: 'Campera',
date: 1581397200000
}),
new Product({
Expand All @@ -181,8 +181,8 @@ var products =
color: 'OYSTER WHITE',
size: 'XS,M',
quantity: 23,
department: 'Kids',
category: 'Girl',
department: 'Niños',
category: 'Niña',
date: 1597962874736
}),
new Product({
Expand All @@ -194,8 +194,8 @@ var products =
color: 'BLACK ',
size: 'XS',
quantity: 23,
department: 'Kids',
category: 'Boy',
department: 'Niños',
category: 'Niño',
date: 1597962874736
}),
];
Expand Down