psispace-sys
SystemService::PsiSpaceSys
struct SystemService::PsiSpaceSys {
const psibase::AccountNumber service;
serveSys(...);
storeSys(...);
removeSys(...);
};
Provide web hosting.
This service provides web hosting to non-service accounts. It supports both an
upload UI (TODO) and command-line upload using psibase upload and
psibase upload tree.
Uploading a directory tree:
psibase -a $ROOT_URL -s $PVT_KEY upload-tree -S $ACCOUNT psispace-sys / $DIR
Uploading a single file:
psibase -a $ROOT_URL -s $PVT_KEY upload -S $ACCOUNT psispace-sys
/index.html text/html $PATH_TO_FILE
You don't need the -a and -s options if your running a local test chain at
http://psibase.127.0.0.1.sslip.io:8080/ and don't protect the accounts with keypairs.
After files are uploaded, the site is available at either http://$ACCOUNT.$DOMAIN or
http://$DOMAIN/applet/$ACCOUNT
SystemService::PsiSpaceSys::serveSys
std::optional<psibase::HttpReply> SystemService::PsiSpaceSys::serveSys(
psibase::HttpRequest request
);
SystemService::PsiSpaceSys::storeSys
void SystemService::PsiSpaceSys::storeSys(
std::string path,
std::string contentType,
std::vector<char> content
);
SystemService::PsiSpaceSys::removeSys
void SystemService::PsiSpaceSys::removeSys(
std::string path
);