This tutorial follows on from Introducing Docker Containers to Computing Students and is part of a series. If this is your first time here, maybe start at the beginning.
Introducing Docker Containers to Computing Students
Up until now, students have had access to creating Virtual Machines (VMs) on the Dundalk Institute of Technology network via our Xen Orchestra Appliance (XOA) at http://xoa.comp.dkit.ie. But VMs in the real world are rapidly being replaced by “containers”, so it’s time to take things to a whole new level.
Password Generator Written In PHP
To mark #WorldPasswordDay, today we will look at how to generate a strong password inside your PHP application.
Express.js Web Application
Express.js provides an easy way to create web server and render HTML pages for different HTTP requests by configuring routes for your application.
PHP MySQL Ajax Live Search
Value Interpolation in JavaScript Code using Pug
Interpolating values is helpful if you need to pass a server-side variable to client-side JavaScript (or other languages that require it).
In the case of variables, numbers, strings, and the like, you can pass these types of variables directly into your JavaScript with bracket syntax plus an explanation point (so that the code inside the brackets is not evaluated.) This is useful for parametrizing JavaScript code that require something from your server.
Server Side Variable Interpolation with Pug
It’s possible to pass variables from your server into Pug for dynamic content or script generation. Pug templates can access variables passed to the res.render
function in Express (or pug.renderFile
if you are not using Express, the arguments are identical).
Raw Variable Interpolation in HTML with Pug
Content interpolated with bracket syntax will be evaluated for code, the output of which is included in your HTML output.
HTML Element Interpolation with Pug
Further to our previous tutorial, sometimes it may be necessary to nest HTML tags inside of each other. Element interpolation with Pug is done in a syntax similar to variable interpolation; square brackets instead of curly braces are used here.