Coder Social home page Coder Social logo

cakefest2023-workshop's Introduction

CakeFest 2023 workshop

The source code for the workshop given at Cakefest 2023

Branches

This repository has several branches for the various stages of my workshop:

  • master Contains a basic CakePHP 5 demo.
  • authentication-authorization Contains a simple application with authentication and authorization setup.
  • sudomode-complete Contains the completed sudo-mode application.
  • webauthn-complete Contains the completed webauthn/passkeys application.

Installation

  1. Download Composer or update composer self-update.
  2. Run php composer.phar install.

If Composer is installed globally, run

composer install

You can now start the CakePHP development server with:

bin/cake server -p 8765

Then visit http://localhost:8765 to see the welcome page.

mkcert & stunnel

For the webauthn example, the application needs to be behind a TLS webserver. The cakephp dev server can't do TLS, so I'm using a pair of CLI utilities you can generate an HTTPs proxy for the cakephp dev server. I found this pretty simple to use on linux.

Generate certificates for your local machine using mkcert

mkcert localhost
cat localhost.pem localhost-key.pem > localhost-bundle.pem
chmod 0666 *.pem

This will generate certificate & key file. Create the bundled certificate for stunnel

Then in one terminal, run: bin/cake server and then in another run

sudo stunnel3 -f -d 443 -r 8765 -p ./localhost-bundle.pem

Configuration

Read and edit the environment specific config/app_local.php and set up the 'Datasources' and any other configuration relevant for your application. Other environment agnostic settings can be changed in config/app.php.

cakefest2023-workshop's People

Contributors

markstory avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.