This commit is contained in:
parent
4f03a9daaa
commit
c7413b0b37
|
@ -516,9 +516,7 @@ export default function killTheNewsletter(
|
||||||
|
|
||||||
if (require.main === module) {
|
if (require.main === module) {
|
||||||
console.log(`Kill the Newsletter!/${VERSION}`);
|
console.log(`Kill the Newsletter!/${VERSION}`);
|
||||||
const configurationFile =
|
if (process.argv[2] === undefined) {
|
||||||
process.argv[2] === undefined ? undefined : path.resolve(process.argv[2]);
|
|
||||||
if (configurationFile === undefined) {
|
|
||||||
const { webApplication, emailApplication } = killTheNewsletter(
|
const { webApplication, emailApplication } = killTheNewsletter(
|
||||||
path.join(process.cwd(), "data")
|
path.join(process.cwd(), "data")
|
||||||
);
|
);
|
||||||
|
@ -529,6 +527,7 @@ if (require.main === module) {
|
||||||
console.log(`Email server started at ${webApplication.get("email")}`);
|
console.log(`Email server started at ${webApplication.get("email")}`);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
const configurationFile = path.resolve(process.argv[2]);
|
||||||
require(configurationFile)(require);
|
require(configurationFile)(require);
|
||||||
console.log(`Configuration loaded from ‘${configurationFile}’.`);
|
console.log(`Configuration loaded from ‘${configurationFile}’.`);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue