npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cdk-serverless-php-mpa

v0.0.3

Published

A JSII construct lib to build AWS Serverless LAMP stacks with AWS CDK that support traditional multi-page applications.

Downloads

6

Readme

cdk-serverless-php-mpa

Inspired in-part by cdk-serverless-lamp (which was limited to Laravel SPAs). This cdk-serverless-php-mpa repo contains a JSII construct library that allows you to deploy an AWS Serverless "LAMP" stack with AWS CDK that attempts support traditional multi-page applications. At the core this is made possible thanks to a custom AWS Lambda runtime: Bref

Requirements

  • Docker

Example deployments

See CDK Workshop for the background required to understand how to use the below examples.

Basic PHP app deployment

AWS Architecture Diagram

Create a basic PHP deployment using Lambda & HTTP API. Similar to a traditional Linux + PHP + Apache setup.

const code = new Code(stack, 'PhpMpaCode', {
  src: 'src/basic-php-app/',
});

Complex PHP app deployment

AWS Architecture Diagram

Create a complex PHP deployment using Lambda, HTTP API, RDS, EFS, CloudFront, WAF, ACM, and Route53. Similar to a traditional LAMP stack with the added bonus of auto-configurable SSL/TLS, custom domains, and a rudimentary firewall.

const network = new Network(stack, 'PhpMpaNetwork');

const database = new Database(stack, 'PhpMpaDatabase', {
  network: network,
  name: 'PhpMpaDatabaseIntegTest',
});

const filesystem = new Filesystem(stack, 'PhpMpaFilesystem', {
  network: network,
});

const code = new Code(stack, 'PhpMpaCode', {
  src: 'src/basic-php-app/',
  database: database,
  network: network,
  filesystem,
});

const domain = new Domain(stack, 'PhpMpaDomain', {
  name: 'example.com',
  hostedZone: route53.HostedZone.fromHostedZoneAttributes(stack, 'PhpMpaHostedZone', {
    hostedZoneId: 'Z2N1QZPV2S5PMX',
    zoneName: 'example.com',
  });
});

const cdn = new Cdn(stack, 'PhpMpaCdn', {
  code,
  domain,
  waf: {
    allowListIpsV4: [
      '192.0.2.0/32',
    ],
    allowListIpsV6: [
      '2001:db8::/128',
    ],
    rateLimit: 100,
  },
});

Library and Construct resource options

See API.md for full options.