pages -> sites

This commit is contained in:
AJ ONeal 2017-08-01 09:40:01 -06:00
parent 4d54de7025
commit 242e39361f
1 changed files with 19 additions and 27 deletions

View File

@ -106,7 +106,6 @@ Currently being tested with Ubuntu, Raspbian, and Debian on Digital Ocean, Raspb
├── node_modules ├── node_modules
├── packages ├── packages
│ ├── apis │ ├── apis
│ ├── pages
│ └── services │ └── services
└── var └── var
└── sites └── sites
@ -211,16 +210,16 @@ Deleting those files will rese
Accessing static apps Accessing static apps
--------------------- ---------------------
Static apps are stored in `packages/pages` Static apps are stored in `var/sites`
``` ```
# App ID as files with a list of packages they should load # App ID as files with a list of packages they should load
# note that '#' is used in place of '/' because files and folders may not contain '/' in their names # note that '#' is used in place of '/' because files and folders may not contain '/' in their names
/srv/walnut/packages/sites/<domain.tld#path> # https://domain.tld/path /srv/walnut/var/sites/<domain.tld#path> # https://domain.tld/path
/srv/walnut/packages/sites/<domain.tld> # https://domain.tld and https://domain.tld/foo match /srv/walnut/var/sites/<domain.tld> # https://domain.tld and https://domain.tld/foo match
# packages are directories with reverse dns name # For the sake of debugging these packages can be accessed directly, without a site by # packages are directories with reverse dns name # For the sake of debugging these packages can be accessed directly, without a site by
/srv/walnut/packages/pages/<tld.domain.package> # matches apps.<domain.tld>/<package-name> and <domain.tld>/apps/<package-name> /srv/walnut/var/sites/<tld.domain.package> # matches apps.<domain.tld>/<package-name> and <domain.tld>/apps/<package-name>
``` ```
Accessing REST APIs Accessing REST APIs
@ -246,18 +245,6 @@ The packages:
``` ```
/srv/walnut/packages/ /srv/walnut/packages/
├── api ├── api
├── pages
│ └── com.example.hello
│ └── index.html
│ '''
<html>
<head><title>com.example.hello</title></head>
<body>
<h1>com.example.hello</h1>
</body>
</html>
│ '''
├── rest ├── rest
│ └── com.example.hello │ └── com.example.hello
│ ├── package.json │ ├── package.json
@ -278,6 +265,19 @@ The packages:
│ ''' │ '''
└── services └── services
/srv/walnut/var/
├── sites
└── demo@example.com
└── index.html
'''
<html>
<head><title>demo@example.com</title></head>
<body>
<h1>demo@example.com</h1>
</body>
</html>
'''
``` ```
The permissions: The permissions:
@ -287,13 +287,13 @@ The permissions:
├── client-api-grants ├── client-api-grants
│ └── cloud.foobar.me │ └── cloud.foobar.me
│ ''' │ '''
com.example.hello # refers to /srv/walnut/packages/rest/com.example.hello hello@example.com # refers to /srv/walnut/packages/rest/hello@example.com
│ ''' │ '''
└── sites └── sites
└── daplie.me └── daplie.me
''' '''
com.example.hello # refers to /srv/walnut/packages/pages/com.example.hello seed@example.com # refers to /srv/walnut/var/sites/seed@example.com
''' '''
``` ```
@ -303,11 +303,3 @@ API
``` ```
req.apiUrlPrefix => https://api.example.com/api/tld.domain.pkg req.apiUrlPrefix => https://api.example.com/api/tld.domain.pkg
``` ```
TODO
----
* HTTPS Key Pinning
* Heroku (pending completion of PostgreSQL support)
* [GunDB](https://gundb.io) Support
* OpenID support