Skip to content

overcome certificate authentication using local mongodb in developmen…#1

Merged
0xonaroll merged 6 commits intomasterfrom
admin-features
Aug 1, 2018
Merged

overcome certificate authentication using local mongodb in developmen…#1
0xonaroll merged 6 commits intomasterfrom
admin-features

Conversation

@0xonaroll
Copy link
Contributor

overcome certificate authentication using local mongodb in development mode.
Added mailto link for mentors and personal development mode information

Copy link
Contributor

@Anton-Cao Anton-Cao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work! Left a few small notes about removing leftover comments, and storing the event info in config.json rather than hardcoding it into the frontend.

// $name = "Anurag Golla"
// $token = ""
// $redirect_url = $login_url . '?email=' . $email . '&name=' . $name . '&token=' . $token;
// }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you remove these comments to keep the code clean?

})
});

$scope.target = new Date("May 18, 2019 19:00:00").getTime();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it would be better for the date to be set in config.json and fetched from the server through an http request rather than hard-coded into the frontend


<!-- countdown timer -->
<center>
<h1>COUNTDOWN TO PROJXPO 2019!</h1>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ProjX teams actually demo twice a year haha, once at xFair in February and once at ProjXpo in May. It would be helpful to have the name of the current upcoming event (ie. xFair/ProjXpo 2019) stored in config.json as well, so that the frontend can fetch that information.

"sweetalert": "^1.1.3"
},
"devDependencies": {
"gulp": "^3.9.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i forgot - why was this line deleted?

// var key = 0
var url = '/api/user/login'
res.redirect(url)
// res.status(200).send(url + '?key=' + key)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove unnecessary comments to keep code clean 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, semicolons for consistency

// req.session.isAdmin = newUser.isAdmin;
// res.redirect('/portal');
// }
// });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(remove comments)

Copy link
Contributor

@Anton-Cao Anton-Cao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra comments about adding semicolons.

// var key = 0
var url = '/api/user/login'
res.redirect(url)
// res.status(200).send(url + '?key=' + key)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, semicolons for consistency

} else {
// FORCE log in successful
const email = config.devEmail
const name = config.devName
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

semicolons for consistency

Copy link
Contributor

@Anton-Cao Anton-Cao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New API routes look good! Left a comment to update the example config.json in the readme so future devs know what fields to include.

Also, I'm running into an issue where pressing "login" doesn't redirect me to the home page and I have to manually change the URL - if you are facing this problem too, can you push a fix?


8. Change `mongoUri` in `config.json` from `"data"` to `"mongodb://localhost:27017/projx"`.

9. For development start, run `$ mongod` in one terminal and `$ gulp` in another terminal in the directory of the projx folder. No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great documentation - make sure to update the example config.json so that it includes devName, devEmail, upcomingEventName, and upcomingEventDate as well.

@0xonaroll 0xonaroll merged commit 1579938 into master Aug 1, 2018
@0xonaroll 0xonaroll deleted the admin-features branch August 1, 2018 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants