Eric Whale

Reset DB by connection issue

......@@ -73,7 +73,6 @@ const loginUser = asyncHandler(async (req, res) => {
// @route GET /api/users/self
// @access Private
const getSelf = asyncHandler(async (req, res) => {
// TODO
res.status(200).json(req.user);
});
......
{
"name": "client",
"version": "0.1.0",
"proxy": "http://localhost:6000",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.4",
......
......@@ -6,6 +6,9 @@ const connectDB = async () => {
const conn = await mongoose.connect(process.env.MONGO_URI);
console.log(`MongoDB Connected: ${conn.connection.host}`.cyan.underline);
} catch (error) {
console.log(
`Error occured while connecting to the mongoDB`.magenta.underline
);
console.log(error);
process.exit(1);
}
......