The project requires node version 15 or later and npm version 7 or later.
If you need older versions of node and npm in other projects you can use Node Version Manager to switch whenever you like. The project contains an .nvmrc
file which automatically triggers nvm once you configured the deeper shell integration
To start the Development, run npm run setup
in the root project (fizz-buzz-api
).
This command will run npm install
on the root project and afterwards bootstrap all packages. You can not run npm install
manualy on the packages because that would break cross-dependencies between the packages.
See Lerna Bootstrap Documentation for more information.
To build the project, run npm run build
in the root project (fizz-buzz-api
).
This command will run npm run build
on all packages. You could also run npm run build:production
which optimises for deployment.
Use this curl
call with any number you like to test the service:
curl --location --request POST 'https://lylfgt8q40.execute-api.eu-central-1.amazonaws.com/prod/check' \
--header 'Content-Type: application/json' \
--data-raw '{ "number": 30 }'
Before deployment you must run npm run build:production
which optimises for deployment. Then you can deploy by going to the infrastructure package (packages/infrastructure
) and run npm run cdk -- deploy
. This will deploy the project to your default aws account if configured.
See AWS CDK Documentation for more information.
You can find the Sonarcloud projects here:
If you want to have the sonarlint result in your editor when developing put the following configuration in your user settings:
{
"sonarlint.connectedMode.connections.sonarcloud": [
{ "organizationKey": "stormreply", "token": "<generated from https://sonarcloud.io/account/security/>" }
]
}