![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
github.com/btbd/timeline
A simple timeline for logging pictures with messages.
p
- Port (default 80)h
- Web page header title (default "Timeline")v
- Display debug infocrt
- File path to certificate for TLSkey
- File path to key for TLSposts
- Directory path to store poststokens
- File path to Bearer tokens separated by new lines for verifying POST requests
firstToken123 # comment
secondToken987 # another comment
host/post
with:
Authorization
- Contains a valid Bearer token (if necessary)from
(author) and message
(caption text for image)var request = require("request");
var fs = require("fs");
request({
method: "POST",
url: "http://localhost/post",
headers: {
"authorization": "Bearer token123",
"content-type": "multipart/mixed"
},
multipart: [
{
"content-type": "application/json",
body: JSON.stringify({
"from": "the author",
"message": "the message",
})
},
{
"content-type": "image/jpeg",
body: fs.createReadStream("image.jpg")
}
],
}, function(error, response, body) {
console.log(error, body);
});
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.