Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 1 | NDN Catalog (NDN Query and Retrieval Tool) |
| 2 | ========================================== |
| 3 | |
| 4 | This is the front end to the catalog which contains all of the client html and code. |
| 5 | |
| 6 | Setup |
| 7 | ----- |
| 8 | |
Tyler Scott | b59e6de | 2015-09-18 14:46:30 -0600 | [diff] [blame] | 9 | ###To simply run the client code: |
| 10 | |
| 11 | You will need the following things setup: |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 12 | |
| 13 | * A NDN backend running somewhere (The default config is pointed at a test backend) |
| 14 | * NDN-JS |
| 15 | + Run `git submodule init ndn-js` in the client directory. |
| 16 | + Then run `git submodule update` |
Tyler Scott | b59e6de | 2015-09-18 14:46:30 -0600 | [diff] [blame] | 17 | * Configure the config.json in catalog-dev |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 18 | + If it doesn't exist, you will need to copy it from the config-example.json |
Tyler Scott | b59e6de | 2015-09-18 14:46:30 -0600 | [diff] [blame] | 19 | + config.json is intentionally left out of the git to prevent overwriting your changes. |
| 20 | |
| 21 | _Note: The dev code runs from catalog-dev and is not gauranteed to run across all browsers. Only the deployment code is prepared in such a way that we can promise the code will work. (Internet explorer may work but is not officially supported by either option)_ |
| 22 | |
| 23 | ###To run the deployment code: |
| 24 | |
| 25 | You will additionally require npm and node installed (npm is packaged with the default node installation). |
| 26 | |
| 27 | Run the following: |
| 28 | ``` |
| 29 | npm install -g gulp |
| 30 | npm install |
| 31 | gulp |
| 32 | ``` |
| 33 | |
| 34 | The site will now be available in the catalog directory. |
| 35 | |
| 36 | If you run into issues of requiring sudo access you may need to [configure the npm prefix](http://competa.com/blog/2014/12/how-to-run-npm-without-sudo/) to point your global package repo somewhere else. Should you find yourself in a situation that you don't mind using sudo, feel free to simply just run with sudo. |
| 37 | |
| 38 | ##Serving the site: |
| 39 | |
| 40 | To serve the site, point a webserver at the same directory this README file is in. Then give users the url: http://<your domain>/catalog or /catalog-dev depending on if you are running deployment code. |
| 41 | |
| 42 | HTTPS is not supported and will break the code as it is unless the ndn backend is running a valid certificate as well, this is due to a security rule in most browsers that restricts the ws protocol from running in https tabs/frames. All content in the https frame MUST be secure. (Aka run wss in https) (HTTPS is not officially supported) |
Tyler Scott | 0826385 | 2015-07-31 19:05:52 -0600 | [diff] [blame] | 43 | |
Tyler Scott | 9eb6abd | 2015-08-04 14:48:23 -0600 | [diff] [blame] | 44 | config.json |
| 45 | ----------- |
| 46 | |
Tyler Scott | b59e6de | 2015-09-18 14:46:30 -0600 | [diff] [blame] | 47 | ###Global |
| 48 | * CatalogPrefix - Where should the catalog attach in the URI scheme? (Usually the root of a catalog) |
| 49 | * FaceConfig - A valid NDN node location running the websocket for NDN-JS. |
Tyler Scott | 9eb6abd | 2015-08-04 14:48:23 -0600 | [diff] [blame] | 50 | |
Tyler Scott | b59e6de | 2015-09-18 14:46:30 -0600 | [diff] [blame] | 51 | ###Retrieval |
| 52 | * DemoKey - The public and private portion of an RSA in Base64. This key must be valid in the NDN Network for it to work. |
| 53 | * Destinations - A list of retrieval URIs. These must be running the retrieval code or retrieval will fail. |
Tyler Scott | 9eb6abd | 2015-08-04 14:48:23 -0600 | [diff] [blame] | 54 | |
| 55 | Changing the theme |
| 56 | ------------------ |
| 57 | |
| 58 | Currently the theme is a modified bootstrap theme that is running larger fonts and custom colors. |
| 59 | |
| 60 | If you would like to modify the theme go to [this url](http://bootstrap-live-customizer.com/). To modify the current theme, then upload the variables.less in this folder, make your modifications, and overwrite the variables.less file when you are done (and the theme.min.css). |
| 61 | |
| 62 | |