Skip to content
Practicalli Clojure Web Services
Named alias handler
Initializing search
GitHub
Practicalli Clojure Web Services
GitHub
Introduction
Introduction
Overview
Requirements
REPL Workflow
Contributing
Writing Tips
Service REPL Workflow
Service REPL Workflow
Portal
Mulog Events
System REPL
Aero
Donut System
Integrant
Integrant
Integrant System
Integrant REPL
Projects
Projects
Slack App
Slack App
Create Slack App
Slack Scopes Overview
Slack API Methods
Status Monitor
Status Monitor
Application Server
Debug Requests
Unit Test Mock
Refactor
CI
Deployment
Banking On Clojure
Banking On Clojure
Clojure Server Project
Refactor Handlers
UI Handler Functions
Add More Handlers
CI
Deployment Pipeline
Deployment via CI
Unit Tests
Generative testing
Dev Database
Instrument functions
DB Tables
Database Queries
Create Records
Read Records
Update Records
Delete Records
Cyclic Load Dependency
Clojure spec generate mock data
Generate Data Using Clojure Spec
Unit Testing with the Database
HoneySQL
Namespace design
Production Database - Heroku Postgres
URL Shortner
URL Shortner
Create project
Run project
Test app reloading
Compojure Template
Design data structure
What is in a Request
Redirect short URL to full web address
Add static resources
Disable anti-forgery check
HTML Form
Create HTML Form
Using Ring Redirect
Named alias handler
if-let function
Refactor: Hiccup form
Alias generator
Persist aliases
Postgres setup
Redis setup
create database
add alias to database
get alias from database
delete alias from database
Return short URL
Return URL aliases
TODO App
TODO App
Create Project
Create Project
Update project details
The code so far
Webserver with Ring
Webserver with Ring
Add Ring Dependency
Configure main namespace
Theory: Namespaces
Including Ring in the Namespace
Run Jetty web server
Theory: Specifying Types & java.lang
Run webserver
The code so far
Ring
Create Handler
Create Handler
Add Error message when request not found
Theory: if function
Maps and keywords
Code so far
Unit test handler
Reloading App
Reloading App
Test the wrap-reload middleware
Middleware in Ring
The code so far
Compojure
Compojure
Theory: defroutes is a Clojure macro
Theory: routing
Add Compojure as a dependency
Using Compojure in the project
Adding a goodbye route
About route
Show request info
Variable Path Elements
Theory local name bindings
Theory: Accessing hash-maps
Lisp style Calculator
Code so far
Heroku Deploy
Heroku Deploy
Update the project
Add Procfile
Deploy to Heroku
Code so far
Hiccup
Hiccup
Updating handlers with hiccup
Create a new handler
Code so far
Refactor Namespace
Refactor Namespace
Base routes
Play routes
Task routes
Refactored Core
Code so far
Postgres
Postgres
Postgres install
Environment Variables
Postgres CLI
pgAdmin
Heroku Dataclips
Connecting to Heroku Postgres from Postgres Clients
Jira ticket
How to use Lobos with Heroku
pg:info
Performance Analytics
Postgres toolbelt commands
Connect to Postgres
Connect to Postgres
Add Dependency
Define a Database Connection
Database Model
Database Model
Create table
Create a task
Show all tasks
Delete task
Alternative approaches
Task handlers
Task handlers
Add a task
Show tasks
Delete a task
A working example
Application Servers
Application Servers
Overview of Application servers
Middleware
Routing libraries
New Clojure Project
Create a server
Jetty Server Options
Http-kit Server Options
Route Requests
Start a server
Java System properties
Simple restart approach
Atom based restart
Application Server Logging
Debugging application servers
Routing
Set listen port
Static Content
Building API
Building API
Reitit
Reitit
compojure-api template
Create a compojure-api project
Swagger - self describing APIs
ring-swagger
Plumatic schema - defining the shape of data
Working with JSON files
Testing our API
ring-mock
Cheshire - fast JSON encoding
End to end testing
End to end testing
Terminology
Persistence
Persistence
Relational
Relational
H2 Lightweight Relational Database
Managing database connections
Postgresql database
H2 Relational Database
Database tools
H2 Schema design
next-jdbc
next-jdbc
Using next.jdbc with a Connection pool
Add next.jdbc to a project
Database Specifications
next.jdbc and result sets
Simple database example
Micro-services
Micro-services
Reference
Reference
Ring specification
Ring - request map
CI: Heroku
Named alias handler
λ︎
Back to top