Download Latest Version v1.4.1 source code.zip (45.0 MB)
Email in envelope

Get an email when there's a new version of IHP

Home / v1.3.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2024-05-05 10.2 kB
v1.3.0 source code.tar.gz 2024-05-05 44.6 MB
v1.3.0 source code.zip 2024-05-05 44.9 MB
Totals: 3 Items   89.5 MB 0

IHP is a modern batteries-included haskell web framework, built on top of Haskell and Nix. Blazing fast, secure, easy to refactor and the best developer experience with everything you need - from prototype to production.

This release brings many small quality of life improvements to IHP, fixes lots of bugs and comes with several helpful documentation improvements. There's been over 190 commits since v1.2.0

Major Changes

  • New CLI command: new-session-secret: Until now it's always been a bit tricky to get a new secret for the IHP_SESSION_SECRET env var. To fix that we've added a new new-section-secret command. Run it from the command line inside your IHP project, and it will generate a new random key to use for the IHP_SESSION_SECRET env var:

    bash $ new-session-secret 1J8jtRW331a0IbHBCHmsFNoesQUNFnuHqY8cB5927KsoV5sYmiq3DMmvsYk5S7EDma9YhqZLZWeTFu2pGOxMT2F/5PnifW/5ffwJjZvZcJh9MKPh3Ez9fmPEyxZBDxVp - Proper support for non id primary keys: Previously IHP assumed that your tables primary keys are called id, and that you don't use composite primary keys.

    With this release the following SQL schema will compile without any errors:

    sql CREATE TABLE bits ( bit_arbitrary_ident UUID DEFAULT uuid_generate_v4() PRIMARY KEY NOT NULL ); CREATE TABLE parts ( part_arbitrary_ident UUID DEFAULT uuid_generate_v4() PRIMARY KEY NOT NULL ); CREATE TABLE bit_part_refs ( bit_ref UUID NOT NULL, part_ref UUID NOT NULL, PRIMARY KEY(bit_ref, part_ref) ); - GHC Upgrade: 9.4 -> 9.8.2 - New Function: sqlQuerySingleRow: Runs a raw sql query, that is expected to return a single result row Like 'sqlQuery', but useful when you expect only a single row as the result

    haskell do user <- sqlQuerySingleRow "SELECT id, firstname, lastname FROM users WHERE id = ?" (Only userId) - New Function: sqlExecDiscardResult: Runs a sql statement (like a CREATE statement), but doesn't return any result

    haskell sqlExecDiscardResult "CREATE TABLE users ()" ()

    There's now also updateRecordDiscardResult, which is like updateRecord, but doesn't return the updated record. - Worker support exponential backoff: haskell instance Job DraftEmailJob where backoffStrategy = ExponentialBackoff { delayInSeconds = 30 } perform job = do -- ...

Minor Changes

Docs

We've made some major improvements to the Deployment Guide. With a focus on deploying to NixOS servers running on AWS EC2 and how to connect your server to CloudWatch.

Full Changelog: https://github.com/digitallyinduced/ihp/compare/v1.2.0...v1.3.0

Updating

→ See the UPGRADE.md for upgrade instructions.


If you have any problems with updating, let us know on the IHP Discourse.

📧 To stay in the loop, subscribe to the IHP release emails (right at the bottom of the page). Or follow digitally induced on twitter.

Source: README.md, updated 2024-05-05