New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/btbd/timeline

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/btbd/timeline

  • v0.0.0-20190617144845-da57fcf6d30d
  • Source
  • Go
  • Socket score

Version published
Created
Source

Timeline

A simple timeline for logging pictures with messages.

Usage

Server Arguments

  • p - Port (default 80)
  • h - Web page header title (default "Timeline")
  • v - Display debug info
  • crt - File path to certificate for TLS
  • key - File path to key for TLS
  • posts - Directory path to store posts
  • tokens - File path to Bearer tokens separated by new lines for verifying POST requests
    • If this is not specified, no Bearer token is necessary to add a post
    • Example tokens file
firstToken123 # comment
secondToken987 # another comment

Adding Posts

  • Make a multipart POST request to host/post with:
    • HTTP Header Authorization - Contains a valid Bearer token (if necessary)
    • 1st part - JSON message containing from (author) and message (caption text for image)
    • 2nd part - Raw image to post
Example POST using NodeJS
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

Package last updated on 17 Jun 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc