bff_public_web v1.0.0
Bff public web
Local execution
- Initialize as typescript project
func init --worker-runtime typescript
- Install dependencies
Before installing the dependencies, configure your .npmrc file following the example you will find in keeper. Without this step you will not be able to install some of the necessary dependencies as shared repositories in Azure.
npm install
- A build must be created for each change in code
npm run build
- Launch function
npm start // func start
Now the console should show the exposed endpoints
Environment Variables
You can see a list of the environment variables in the .env.dist file Environment variables are added to local.settings.json
Some tests may need environment variables, these should be in a traditional .env file
Example:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "node",
"MY_ENV_VARIABLE": "VALUE"
}
}
Testing
The current tests are end to end, one of the problems is the cold starts of the functions on which it depends, momentarily we must warm up these functions before launching the tests so as not to exceed the jest waiting time
Once the functions are "warmed up", execute the following command:
npm run test
5 months ago