This repo contains the sources of the app, netlify functions and configuration files.
- Node.js version 10.x: latest
- Angular CLI:
npm install -g @angular/cli
- Netlify lambda CLI :
npm install -g netlify-lambda
Here you have to:
- clone this repo
- init the pdf-to-url submodule by running
git submodule init ; git submodule update
(cf. section 3.3) - run
yarn install
- finally you have to set
PDF_API_URL
as environment variable.
- To test your code you can run
yarn dev
.
By default, the front runs on localhost:4200/
.
To call a lambda, you can call this endpoint:
<root>/.netlify/functions/{function_name}
Ex: A get on this root localhost:4200/.netlify/functions/status
will return a 200
Here is a documentation to know more about
netlify lambda function
We use the inspector protocol to ease lambda debugging. You can get diagnostic infos using an inspector client like Chrome DevTools.
Details here
We use the our url-to-pdf service to build pdf from HTML template.
To install it locally you can run:
git submodule init
andgit submodule update
then:npm install
To perform unit tests run:
yarn test
Edit this file to change the configuration (ex the browser).
To perform end to end tests run:
yarn e2e
Edit this file to change the configuration (ex the browser).
The code pushed on this repo is continously deployed to Netlify.
master
is the production branch. What you push there is built and sent live here.
Any other branch or pull request will be automatically deployed too. Check out Netlify documentation to learn more.
In order to reduce the test and build times during the local dev and to launch the application in the same way as in production we use the following environment variables:
-
ENV
which defines the environment of execution, for this one we use 'prod' or 'dev'. It is defined in the package.json file in the various scripts. -
PDF_API_URL
which defines the url of the PDF generation service and must be defined at the system level.
- Angular Calendar
- Moment, a date management library
- Concurrently, allows to run multiple commands concurrently
- Lodash, provides utility functions for common programming tasks