This commit is contained in:
Leandro Facchinetti 2021-03-18 23:07:58 +00:00
parent 58657a1688
commit 027ae35f36
1 changed files with 4 additions and 0 deletions

View File

@ -165,6 +165,10 @@ The guide above covers the basics of running Kill the Newsletter! on a Linux ser
The `configuration.js` file is a JavaScript module that must return a function to be called by the `kill-the-newsletter` executable. Typically this configuration will start the servers (web and email) for Kill the Newsletter!, but it may do anything you wish. The `kill-the-newsletter` executable simply calls the `configuration.js` file and passes a [`require()`](https://nodejs.org/dist/latest/docs/api/modules.html#modules_require_id) function from the perspective of Kill the Newsletter! itself. You may `require(".")` to get a hold of the `killTheNewsletter()` function, which produces the `webApplication` and the `emailApplication`. You may also `require()` any of the Kill the Newsletter! production dependencies listed in [`package.json`](package.json).
#### Migration
If you installed Kill the Newsletter! before 2021-03-18 then you need to start from scratch because the deployment process changed (its **much** simpler now!). You may migrate existing feeds with the migration tools found in the [v1.0.1 release](https://github.com/leafac/kill-the-newsletter/releases/tag/v1.0.1) or the [`migration` tag](https://github.com/leafac/kill-the-newsletter/tree/migration). Just make a backup of your `feeds/` directory, download the migration executable, and run it from the directory containing `feeds/`. Itll produce a `data/` directory with the data in the new format.
#### Using the [`kill-the-newsletter` npm Package](https://npm.im/kill-the-newsletter)
For people familiar with TypeScript/JavaScript, Kill the Newsletter! is also distributed as an npm package. You may run it with `npx kill-the-newsletter`, or `npm install kill-the-newsletter` into your project to `import` or `require` it and mount it as part of a bigger [Express](http://expressjs.com) application.