Skip to content

Instantly share code, notes, and snippets.

@bleonard252
Last active November 17, 2018 16:55
Show Gist options
  • Save bleonard252/00dfe961f0a26fc540b746abd20be2f3 to your computer and use it in GitHub Desktop.
Save bleonard252/00dfe961f0a26fc540b746abd20be2f3 to your computer and use it in GitHub Desktop.
Inter-Planetary Processing Definition

InterPlanetary Processing Definition

The InterPlanetary Processing Definition is a file that determines how to process or handle other files on the network. It fulfills the purpose of a backend without the need for an actual backend.

Use Cases

  1. Say, for example, you want to have a Python script handle posting to a blog. You might use such a file as this:
#!ippd
type: py #python works too
apply-to: .post.py
  1. Another potential use case is importing PHP-based sites, such as WordPress:

Must be .ippd

#!ippd
type: php
apply-to: .
  1. Other use cases could involve Node.JS servers:
#!ippd
type: nodejs #node.js and node work too
apply-to: index.js

Document Structure

  • All IPPD documents must have the header #!ippd on its own line.
  • IPPD files must be in YAML format.

Keys

Key Value Example Notes
type The type of data to be processed or the program to use to process it. Must be one of the types shown below. php
apply-to The file(s) to process. QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 Value can be any of: hash (recognized by Qm), relative address (./), multiplex url (/dnsaddr/ipfs.io)
prop An object which configures the type's program, i.e. the PHP environment. none

Special Programs

Possible "special" values for Type include:

Type Description
mail Mail server (perhaps simulated/real SMTP/POP3/IMAP/etc?)
apache Runs the apply-to on a simulated shared hosting provider
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment