Skip to content

Iteatime/Acrabadabra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0859cd9 · Apr 28, 2023
Jan 13, 2023
Apr 28, 2023
Apr 28, 2023
Jan 13, 2023
Apr 28, 2023
Oct 29, 2018
Apr 28, 2023
Jan 13, 2023
Jul 15, 2022
Apr 28, 2023
Apr 28, 2023
Jan 13, 2023
Feb 11, 2019
Jan 13, 2023
Apr 28, 2023
Jan 13, 2023
Oct 29, 2018
Jan 13, 2023
Apr 28, 2023

Repository files navigation

Acrabadabra

This repo contains the sources of the app, netlify functions and configuration files.

How To start:

1 Requirements:

  • Node.js version 10.x: latest
  • Angular CLI: npm install -g @angular/cli
  • Netlify lambda CLI : npm install -g netlify-lambda

2 Installation:

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.

3 Dev server:

  • To test your code you can run yarn dev.

By default, the front runs on localhost:4200/.

3.1 Lambda usage

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

3.2 Debugging lambdas

We use the inspector protocol to ease lambda debugging. You can get diagnostic infos using an inspector client like Chrome DevTools.

Details here

3.3 PDF api

We use the our url-to-pdf service to build pdf from HTML template.

To install it locally you can run: git submodule init and git submodule update then:npm install

4 Unit tests:

To perform unit tests run: yarn test

Edit this file to change the configuration (ex the browser).

5 End to end tests:

To perform end to end tests run: yarn e2e

Edit this file to change the configuration (ex the browser).

Continous deployment:

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.

Environment variables

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.

Used Libraries