This is the source code for Permanent.org's front-end.
To get started, first create the file for the environment variables.
cp .env.template .env
Add your environment secrets to .env
.
Install the project dependencies with npm install
.
Then run the app using npm run dev
to point the dev server against your local.permanent.org
VM accessible at https://ng.permanent.org:4200
- Note: You'll need to add a host file redirect to point ng.permanent.org to either localhost or 127.0.0.1
If your development environment is missing the appropriate SSL certificates at /etc/ssl
, you'll have to configure your browser and OS to trust the auto-generated SSL certificates. See here for more details about getting a local development environment set up.
To build the app for production you can run npm run build
. For building a version of the app to be used in the Permanent devenv, run npm run build:local
If adding any new secrets, update .env.template
and src/required-secrets.js
with the new variable names.
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
.
npm install
npm run test
Depending on your system configuration, the test runner (Karma) may start a web server and make you manually navigate to a URL to run tests in your actual browser. To run tests directly in the terminal, you may need to pass in a CHROME_BIN
environment variable to point to your installation of Google Chrome.
CHROME_BIN=chromium npm run test
The exact value of CHROME_BIN
may depend on your specific system.
This project uses Storybook. Run npm run storybook
to start Storybook locally. Run npm run build-storybook
to build a copy of Storybook for deployment elsewhere.
This project was initially generated by Angular CLI version 6.0.8.