my website files
blog | ||
board | ||
comics | ||
error-pages | ||
experiments | ||
images | ||
isthistheyearofthelinuxdesktop | ||
links | ||
node | ||
project | ||
search | ||
strips | ||
theunderland | ||
theunderlandcouk | ||
.gitignore | ||
dvdfilms.html | ||
favicon.ico | ||
html.js | ||
index.css | ||
index.html | ||
LICENSE | ||
package-lock.json | ||
package.json | ||
README.md | ||
sewage_scriptures.html | ||
template.js |
Website
This is all the code for the website (deadvey.com)
Node
The nodejs code that is executed in the background is in /node
You can execute the node code in crontab (crontab -e
)
eg:
* * * * * node /var/www/html/node/makeblogs.js
* * * * * node /var/www/html/node/newsletter.js
* * * * * node /var/www/html/node/updatefeed.js
etc...
Newsletter
If you want to add members to the newsletter, I store a file as /etc/newsletter_members.js:
let members = ["member1@gmail.com","member2@outlook.com"]
if (typeof module !== 'undefined' && module.exports) {
module.exports = members;
}
Setup
I use apache2 to run the website and accept traffic, though for the main site it runs on nodejs which is hosted on port :8003
You can run /node/app.js in a tmux session for the website
You can add this to /etc/apache2/sites-enables/000-default.conf to forward to nodejs:
ProxyPass / http://locahost:8003/
And this if you want other sites that use apache2 not nodejs (as exceptions)
ProxyPass /wordpress !
You can also check the node page is running with curl http://localhost:8003