6a3fb6d693 | ||
---|---|---|
.github/workflows | ||
.vscode | ||
src | ||
static | ||
.gitignore | ||
CODE_OF_CONDUCT.md | ||
Caddyfile | ||
LICENSE | ||
README.md | ||
package-lock.json | ||
package.json | ||
tsconfig.json |
README.md
Running Locally
Install Node.js and run:
$ npm install
$ npm start
The web server will be running at http://localhost:8000
and the email server at smtp://localhost:2525
.
Deployment
-
Create a deployment SSH key pair:
$ ssh-keygen
Private key (
id_rsa
): Add to GitHub as a Secret calledSSH_PRIVATE_KEY
.Public key (
id_rsa.pub
): Add to DigitalOcean and to GitHub as a Deploy key for the repository. -
Create a DigitalOcean droplet:
Image Ubuntu 18.04.3 (LTS) x64 Plan Starter Standard $5/mo Additional options Monitoring Authentication Deployment SSH Key Hostname kill-the-newsletter.com
Backups Enable -
Configure DNS in Namecheap:
Type Host Value A
@
<droplet-ip>
CNAME
www
kill-the-newsletter.com
MX
@
kill-the-newsletter.com
-
Setup the server:
$ ssh-add $ npx pm2 deploy package.json production setup
-
Migrate the existing feeds.
-
Push to GitHub, which will trigger the Action that deploys the code and starts the server.