# Nano Webapp

Nano Webapp is the primary user interface of the privacy-first hybrid file sharing system developed at Clarabot.

For copyright and legal information see the `LICENSE.md` file.

## Development server

Browser: Run `ng serve -c development --no-live-reload` for a dev server. Navigate to `https://nano.clarabot.dev/`. You should turn off the live reload, in this environment it can cause socket connection problem.

App: On App you have to make a specific build for the cordova: `ng build -c app-development`. 

## Content Security Policy - CSP check

Browser: Run `ng serve -c pre-production --no-live-reload` for a dev server, which preset CSP header for the actual index.html.

App: You have to make a dev build for the cordova to test the app: `ng build -c app-pre-production`. 

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.

## Build

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).

## Check circular dependency

Run `npx madge --circular --extensions ts ./`
It requires `madge`, so install it globally or dev level
