Skip to content

an e-commerce free platform => under development

Notifications You must be signed in to change notification settings

hidayatarg/t-shop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node JS React JS BootCamp

Under Development an Open-source E-commerce Framework

PG Admin Example

// promises
const getProducts = async (req, res, next) => {
	pool
		.query(getAllProductsQuery)
		.then((result) => {
			res.status(200).json({
				success: true,
				data: result.rows,
			});
		})
		.catch((e) => res.json(e.stack));

	// Async await
	try {
		const result = await pool.query(getAllProductsQuery);
		res.status(200).json({
			success: true,
			data: result.rows,
		});
	} catch (err) {
		res.json(err.stack);
	}
};

TODO

- Create a Seeder => Not DONE
- Create Validator for Post and Put Methods => Not DONE
- Add cross-env to the project

Seting ENV in MacOSX

export NODE_ENV=DEVELOPMENT

catchAsyncErrors is used when try catch is not used to catch the error

RUN TIME "program": "${workspaceFolder}/backend/server.js"

Send Mail

MailTrap is used to send mail to customers.

About

an e-commerce free platform => under development

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published