-
Notifications
You must be signed in to change notification settings - Fork 0
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
Notification setup #6
Conversation
Akasora39
commented
Feb 5, 2020
- Add script for installing Node.js v13 and initializing notifications directory
- Demonstrate basic functionality of nodemailer
src/notifications/index.ts
Outdated
service: 'Gmail', | ||
auth: { | ||
user: '[email protected]', | ||
pass: 'Thisisapassword' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use an environment variable for password and change password
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this is a big oversight on my part. Thanks for pointing it out.
scripts/lib/install_node.sh
Outdated
|
||
# Install Node.js on Linux as root on RHEL, CentOS, CloudLinux, or Fedora | ||
install_node() { | ||
if which node > /dev/null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adopt the command -v
form seen in other install scripts to check if program exists
scripts/lib/install_node.sh
Outdated
@@ -0,0 +1,19 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
library files should not have this line as noted previously
https://google.github.io/styleguide/shell.xml?showone=File_Extensions#File_Extensions
scripts/lib/install_node.sh
Outdated
command -v node >/dev/null 2>&1 || { | ||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash | ||
source ~/.nvm.sh | ||
nvm install node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I usually install the specific version of node like nvm install 13.8
and then nvm use 13.8
. It's better to install the specific version of node to remove any bugs associated with different node versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. I think 12.15.0 would be suitable for this as it's the latest stable version.
LTGM |
scripts/lib/install_node.sh
Outdated
|
||
# Install dependencies for notification folder | ||
init_notif() { | ||
cd ../src/notifications && npm install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add cd -
to return to previous directory. I.e. ensure that the current working directory is the same as when the install function is called.