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
primeNumbers
if required. - 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)
run tests and/or build project in docker
docker build -t bigprimestest .
docker run bigprimestest
Convert to serverless, reactjs and rust.
- Use serverless to deploy reactjs to an s3 bucket.
- Use serverless to deploy a basic rust lambda with a unit test.
- Deploy a reactjs html/css theme for the site
- Write a replacement for the home page and repoint cloudfront just for the home page using distribution "behaviours".
- Repeat for each page type, choosing pure reactjs or supplement with rust as needed.
- there are 1.4*10297 primes smaller than 300 digits
- there is always a prime between n^2 and (n+1)^2.