PHP 7 codebase for bigprimes.net written using the Silex micro-framework.
- Apache instructions: Copy htdocs/.htaccesssample to htdocs/.htaccess and provide it with the variables needed for mysql.
- Run schema.sql on your chosen mysql server and populate tables such as
- php composer.phar install
To host bigprimes.net via AWS Lambda we need to; build a package, copy the bigprimes codebase into it, deploy it to lambda.
All of that has been wrapped up into running the following on an Amazon linux box to compile php.
- touch /tmp/lambda.zip
- terraform init
- terraform apply -var 'rdsuser=user' -var 'rdspass=pass' -var 'rdshost=host' -var 'rdsdb=bigprimes' -var 'subnetA="subnet-aaaaaaaa"' -var 'subnetB="subnet-bbbbbbbb"' -var 'subnetC="subnet-cccccccc"' -var 'securityGroup=sg-gggggggg'
make sure you have your aws credentials in your home directory and you have terraform installed (or referenced in the bin directory, or the repo directory)
Remove redundent code. Organise code into logical folders. Get code to the point where we can run unit tests.
- 100% test coverage.
- there are 1.4*10297 primes smaller than 300 digits
- there is always a prime between n^2 and (n+1)^2.