diff --git a/bin/www b/bin/www index 6100eaf..b1e0992 100755 --- a/bin/www +++ b/bin/www @@ -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); /** diff --git a/configs/mongo-config.js b/configs/mongo-config.js index 3690269..1d27e4a 100644 --- a/configs/mongo-config.js +++ b/configs/mongo-config.js @@ -1 +1,2 @@ -// export mongodb url +const direccion="mongodb://localhost:27017/[DataEComerce][DataCollection]"; +module.exports = direccion; diff --git a/package-lock.json b/package-lock.json index 51fcd06..69b27d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { - "name": "myapp", - "version": "0.0.0", + "name": "ecommerce-nodejs", + "version": "1.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/routes/index.js b/routes/index.js index 005508b..247ab55 100644 --- a/routes/index.js +++ b/routes/index.js @@ -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) diff --git a/seed/index.js b/seed/index.js index e2d9001..9f898d5 100644 --- a/seed/index.js +++ b/seed/index.js @@ -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' }) ] @@ -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' }) ] @@ -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({ @@ -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({ @@ -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({ @@ -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({ @@ -142,7 +142,7 @@ var products = color: 'Dark Blue', size: 'M,L', quantity: 80, - department: 'Men', + department: 'Varones', category: 'Jeans', date: 1597885814264 }), @@ -155,7 +155,7 @@ var products = color: 'Light Blue', size: 'XS,S,M', quantity: 8, - department: 'Men', + department: 'Varones', category: 'Jeans', date: 1581397200000 }), @@ -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({ @@ -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({ @@ -194,8 +194,8 @@ var products = color: 'BLACK ', size: 'XS', quantity: 23, - department: 'Kids', - category: 'Boy', + department: 'Niños', + category: 'Niño', date: 1597962874736 }), ];