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.
- 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
- Another potential use case is importing PHP-based sites, such as WordPress:
Must be .ippd
#!ippd
type: php
apply-to: .
- Other use cases could involve Node.JS servers:
#!ippd
type: nodejs #node.js and node work too
apply-to: index.js
- All IPPD documents must have the header
#!ippd
on its own line. - IPPD files must be in YAML format.
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 | |
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 |