res.end(`{"@context":["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1"],"type":"Person","id":"https://new.shadowfacts.net/ap/actor","preferredUsername":"shadowfacts","name":"shadowfacts' blog","icon":{"type":"Image","mediaType":"image/png","url":"https://new.shadowfacts.net/shadowfacts.png"},"inbox":"https://new.shadowfacts.net/ap/inbox","publicKey":{"id":"https://new.shadowfacts.net/ap/actor#main-key","owner":"https://new.shadowfacts.net/ap/actor","publicKeyPem":"-----BEGIN PUBLIC KEY-----\\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxsePhOEq6EqqgGe+5vKa\\nti8cnvLoP3eJDTHENxX4M9epMIeo48cI214wkAERoNufZLtYeGOHO6YJcVydVSYN\\nUd4lQxgaPwAlh0DB0BUrXR1yfcSAhHS86XBSUq86O3fY5V+vEdZiN5PfUCG5rg5t\\n5V/TrcbVQngXqDmwVZ/OcJ+5vUo+B62Mul7EmiNkZHKzp1VZGVtZ6nZ/4TxsdeSN\\nXT8Vb0f/GJQOQLzW6dV0CBupts6x7o+9oRiYiAH+cXLFyQdTQ+1TrqMSMscdfX9I\\nKos5Ih7oKdj6wQt0pDEOGx090c9JzQC25RzxRk7jc1Jt1UzDi/a1U/BbucxIvPr3\\nPQIDAQAB\\n-----END PUBLIC KEY-----"}}`);
console.log("Sent message to an inbox at",targetDomain);
if(err)console.log("Error:",error,res);
console.log("Response status code: ",res.statusCode)
});
}
// const message = createMessage({"@context":["https://www.w3.org/ns/activitystreams"],"type":"Article","id":"https://new.shadowfacts.net/meta/2019/reincarnation.json","published":"2019-01-02T23:02:42.000Z","inReplyTo":null,"url":"https://new.shadowfacts.net/meta/2019/reincarnation/","attributedTo":"https://new.shadowfacts.net/ap/actor","to":["https://www.w3.org/ns/activitystreams#Public"],"cc":[],"name":"Reincarnation","content":"<figure>\n <img src=\"https://theinfosphere.org/images/9/93/Reincarnation_infobox.png\" alt=\"Futurama Galactic Entity image\" />\n <figcaption>A wise man once said that nothing really dies, it just comes back in a new form. Then he died.</figcaption>\n</figure>\n<p>Stand by for <em><strong>reincarnation</strong></em>.</p>\n<!-- excerpt-end -->\n<p><code>// TODO: write the actual blog post</code></p>\n"});