/safe-web-hosting-manager-electron

This example tutorial app show cases how to create and manage web services for Public ID on SAFE Network. Demonstrates the usage of MutableData API, NFS API, Authentication APIs.

Primary LanguageJavaScriptBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

SAFE Hosting Manager

The tutorial app show cases how to create and manage web services for Public ID on SAFE Network. Demonstrates the usage of MutableData API, NFS API, Authentication APIs.

Note this tutorial app is no longer maintained. For the latest on the SAFE Network project please see safenetwork.tech or our community forum safenetforum.org

Install

  • Note: requires a node version ^8.0.0 and an npm version ^5.0.0

First, clone the repo via git:

$ git clone https://github.com/maidsafe/safe-web-hosting-manager-electron.git && cd safe-web-hosting-manager-electron

And then install Node.js dependencies.

$ yarn

Set NODE_ENV=dev to use Mock Vault. By deafult it uses Actual Network Or set NODE_ENV=prod to use Actual Network.

Run Dev Mode

$ yarn start

To open application on development environment run yarn dev.

Note: Currently not working in osx.

Authorising against Mock

To simplify the auth process, as web-hosting can't received a response when running in dev mode.

Run the app, and in the main menu, select Simulate Mock Response, and you're good to go.

Alternatively, to run against a mock version of the browser (after installing in a dev environment), you can trigger 'dev' libs via setting your env to be NODE_ENV=test.

Packaging

To package apps for the local platform:

$ yarn package

Test

yarn test

Run yarn rebuild-test if there is Node Module Mismatch Error while running test, this will build the native modules for Nodejs. To build it back to Electron run yarn rebuild, now you can start the application.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the MaidSafe Contributor Agreement, version 1.1 ([CONTRIBUTOR] (CONTRIBUTOR)), shall be dual licensed as above, and you agree to be bound by the terms of the MaidSafe Contributor Agreement, version 1.1.