bae74418a0 | ||
---|---|---|
.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
-
Add the public key (
id_rsa.pub
) to DigitalOcean and to GitHub as a Deploy key for the repository. -
Add the private key (
id_rsa
) to GitHub as a Secret calledSSH_PRIVATE_KEY
. -
Create a DigitalOcean droplet.
-
Configure DNS:
Type Host Value A
@
<droplet-ip>
CNAME
www
kill-the-newsletter.com
MX
@
kill-the-newsletter.com
-
Setup the server:
$ npx pm2 deploy package.json production setup
-
Push to GitHub, which will trigger the Action that deploys the code and starts the server.