Personal website development stack.
Front-end is built on PostCSS, Webpack, Babel, ESLint and Browsersync.
Back-end is build on Node.js and Express.
Before using this stack you must first install a few dependencies:
- Node.js: nodejs.org
- node modules:
npm install
Run npm run develop.
FORCE_HTTPS:0|1Ifhttp://should redirect tohttps://.PORT: Website port.PUBLIC_DIR: Public ressources directory.SSL_CERTIFICATE_FILE: Path to the SSL certificate pem file.SSL_CERTIFICATE_KEY_FILE: Path to the SSL certificate key pem file.
First install server-side dependencies:
npm i --productionnpm i -g pm2
pm2 start ecosystem.config.js
pm2 startuppm2 restart izifloorOn Debian 8:
echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list
apt update
apt install certbot -t jessie-backportsReplace "www.example.com" with your host.
certbot certonly --standalone -d www.example.com --rsa-key-size 4096Copy the certificate and private key to the application directory, replace "www.example.com" with your host:
cp /etc/letsencrypt/live/www.example.com/cert.pem cert.pem
cp /etc/letsencrypt/live/www.example.com/privkey.pem key.pemOr set their path into application environment variables.
certbot renewEvery first day of each month at 4 am.
apt-get install cron
crontab -e
0 4 1 * * "$(command -v bash)" -c '/usr/bin/pm2 stop all && /usr/bin/certbot renew && /usr/bin/pm2 restart all'This project is licensed under the MIT license.