14 lines
315 B
JavaScript
14 lines
315 B
JavaScript
const { readFileSync } = require('fs');
|
|
|
|
if(!process.env.WEBMENTION_TOKEN) {
|
|
throw "No webmention token set!"
|
|
}
|
|
|
|
const configToml = readFileSync(`${__dirname}/../config.toml`)
|
|
const endpoint = /webmentionServer = \"(.+)\"/.exec(configToml)[1]
|
|
|
|
module.exports = {
|
|
endpoint,
|
|
token: process.env.WEBMENTION_TOKEN
|
|
};
|