Specific format of service folder names when creating public name service containers?

Hi guys,

Just a quick query because I’m struggling a little bit.

If (for example) I have a public name example123 and I want to create a root service container for it (accessible at safe://aservice.example123, what is the network path format to store within the _public container?

I’ve tried the following with no luck:

"_public/example123/root-aservice"
"_public/example123.root-aservice"

I know that example123 doesn’t actually exist (it’s just an example to put this in context), but I know that my testing public name was created correctly (as I receive a -106 error when I try to view it in the browser, not a -103 error.)

Thanks,
Shane.

This one is correct, as far as the conventions that web hosting manager is using.

Here’s the format for the creation of public names and associated services, again, as far as current web hosting manager conventions are concerned. I say this because the community may devise a different convention altogether.

3 Likes

For that particular part of the process, here’s how WHM inserts the service in _public: https://github.com/maidsafe/safe_examples/blob/master/web_hosting_manager/app/components/with_template.js#L46

1 Like

Perfect, thanks a tonne!

I have register the public name anothersillytest which can be found throwing a -106 error here: safe://anothersillytest

Within my _public directory, I have the following service container created with the TYPE_TAG: 15002 (the WWW metadata TYPE_TAG): _public/anothersillytest/root-test

Any idea why loading safe://test.anothersillytest is still throwing a -106 error?

The -106 ERR_NO_SUCH_ENTRY error is occurring because when you navigate to safe://test.anothersillytest, webFetch is fetching the MD as anothersillytest and then attempting to look for an entry named test, which does not exist.

Okay, so you have a randomly named public MD for your service:

newRandomPublicMD<type_tag: 15002>: {
  index.html: <fileData>,
  favicon.ico: <fileData>
}

Obtain the name of your service, getNameAndTag, then insert it into your public name MD:

newPublicMD<name: sha3hash("anothersillytest")><type_tag: 15001>: {
  test: newRandomPublicMD<type_tag: 15002>.name
}

Now access: safe://test.anothersillytest.

Or insert it as anothersillytest: newRandomPublicMD<type_tag: 15002>.name to access safe://anothersillytest

4 Likes

Thanks a lot, I realise where I’m going wrong now - let me go away and code this up. :slight_smile:

1 Like

@hunterlester just wanted to say thank you again - I’m now able to create service containers at will safe://shane.anothersillytest/ ← this throws an NFS error instead of a -106 error (since I don’t have an index.html, of course), so it seems It’s now functioning as expected and I can start uploading emulated NFS files, thanks!

6 Likes

This topic was automatically closed after 60 days. New replies are no longer allowed.