IHP 1.1 is out now!
Create a new thread +
This endpoint is only available via a WebSocket
giuseppe
Hi, I am following the doc for creating my first project with ihp, after the command ./start, I get this trace : direnv: loading ~/Documenti/sketchbook/blog/.envrc direnv: export ~PATH [("ihpVersion","1.0.1"),("…
Add Response
Need details on deploying IHP docker to AWS EC2
JGarber PRO
I need details on deploying an IHP app using docker on AWS EC2. Specifically I need to know where the SSL Certificate should be. The link from the deploy doc to http://harlambert.co.uk/ihp_notes/ appears to be broken. Thanks for any help…
Add Response
Allowing Cross-Origin Resource Sharing
Marc Linsangan
Hello. How should we set the configuration to allow CORS? I followed the examples in the API documentation by adding "option Cors.simpleCorsResourcePolicy" but couldn't make it work. Can anyone please show how to do it correct…
Add Response
How to configure a favicon?
Joachim Breitner
Should I just manually add a meta tag to Web/View/Layout.hs, or is there something more idiomatic? (An answer to that question might be useful on https://ihp.digitallyinduced.com/Guide/helpful-tips.html) …
Add Response
Reactive HTML forms
JGarber PRO
If I need to implement reactive HTML forms in an IHP project how would I go about doing that? Thanks. …
Add Response
some imports are not found
JGarber PRO
When I add imports to the Web.Component.Counter sample program some imports work and some do not. Imports that work include Text.Read and Data.Text. Imports that don't work include Data.Tuple.Curry and Text.XML.HXT.Arrow.Pickle. Depe…
Add Response
How do you deal with money?
axelbdt
Hello again! I am looking for pointers on how to handle money/pricing. Based on the stripe integration example, I represent the price of a Trip as an Integer, i.e the number of cents. I still want the user to read and input a decimal number…
Add Response
Help needed with validateFieldIO
axelbdt
Hello everyone, I am looking for a little help with the usage of validateFieldIO, as I am not used to the IO Monad yet. My user creates a bill for one of his clients by selecting him in a form in the NewBill action. The user is presented wi…
Add Response
Code formatter config that is compatible with code gen?
axelbdt
Hello, Love hacking on IHP so far, but I am confused about the code formatting config I should use so it is consistent with formatted code, any recommendation? Alternatively, I tried a heavy handed formatting of all haskell files of the boi…
Add Response
Routes inspection
Fidel
It would be nice to have a way to inspect (and edit?) all routes. Perhaps also to design a set of routes and obtain the Actions for them... Is there something like that already, or a plan to have it? …
Add Response
Validation with monadic operations
Fidel
When using withCustomErrorMessageIO, it adds the custom error message to whatever error happens to be there... That is, if I do: ... |> validateField #name nonEmpty |> withCustomErrorMessageIO "Name is already taken&quot…
Add Response
File uploads on IHP Cloud: Can't create folder
Lillo PRO
Hi! File uploads are failing for me and I am unsure of what the reason can be. I get this error from sentry: /tmp/ihp-upload-6de360a7d350dccc: createDirectory: does not exist (No such file or directory) This is the function that uploads an…
Add Response
Best Mac system to install IHP
nimmividya
I am planning to buy IHP and IHP Cloud. I am a Mac user. I tried to install IHP on my MacBook Air M1 with Mac OS Monetary. It did not work. What is the best Mac System to install IHP? Thanks. …
Add Response
Any way to upload files through API?
Lillo PRO
Hi! I'm trying to attach a file to an IHP endpoint and catch that file with fileOrNothing, but nothing I try works. Tried everything from base64 to ArrayBuffer and File type in JS, but fileOrNothing ignores it. I have primarily tried to…
Add Response
Installation on Windows 10 (wsl): nix-env stderr: error: executing SQLite statement
Jörg Brüggmann
Dear all, I just tried to install IHP according to this installation procedure here: "https://ihp.digitallyinduced.com/Guide/installation.html". It seemd to work but when creating the very first project with "ihp-ne" acc…
Add Response
JSONB with fill
I noticed that the IHP fill function gives a could not deduce (ParamReader Value) type error when trying to populate a record field with type JSONB. The application here is just looking to store the raw JSON payload from n AJAX request. I&#…
Add Response
Setting Cookies
peterbuckley17 PRO
I'd like to set cookies to manage access to a service via Cloudfront. Is there a best-practice way of setting a simple cookie {key}={value}? I'm having trouble parsing through the Session cookie code for inspiration. …
Add Response
How do i run more services?
Carl Hedgren PRO
I have a service that grabs things from the internet and puts in in postgres, how do i define that in ihp? in other deployments it gets run as a systemd unit. Is the best way to run it as an IHP Job? …
Add Response
How to check if column exist, update if it does, and insert new if it doesnt?
Say I have a Post with many to many relationship to tags. It's nice to add the tags as a comma separated list when creating a post. That means I need to update two records at the same time. That seems fine. However, i struggle with the …
Add Response
./start: line 29: RunDevServer: command not found
vajrabisj
when execute the ./start of the blog example, got the following error: error: cycle detected in build of '/nix/store/mhgprkxfnmjglp547skvagf4kwikd23h-ormolu-0.1.4.1.drv' in the references of output 'bin' from output 'out…
Add Response
Where is ihp-app-to-docker-image command
bai PRO
I have ihp pro now, build the code again and everything looks fine. But I didn't find "ihp-app-to-docker-image" command, it is a pro feature and document said it can be used in the "application" folder. Where is this…
Add Response
Slack-like Demo returns HTTP 502
ElectricErudite
Going through the docs and wanted to check out the live demo of the Slack-Like app (https://ihpchatexampleapp.ihpapp.com/). The url returns an HTTP 502. Was the live demo taken down for some reason? Any other tips or ideas? …
Add Response
Gitpod instance broken
Gonzalo Muñoz
Hi! I tried cloning the template for Gitpod but when I fire it up, I get the following errors: Warning: haddock-interfaces: /nix/store/sar2db2iiy3dmw7sag30zgwdl299i9mq-bytestring-builder-0.10.8.2.0/share/doc/x86_64-linux-ghc-8.10.4/bytestri…
Add Response
How do I trigger a job scheduled for later by setting #runAt?
Lillo PRO
Hi! I have a habit tracker on my app, and every time I mark that I have for example exercised today, I want to schedule an action to be performed just after midnight (at the users LocalTime), meaning at the very start of the following day. …
Add Response
Making a simple form type-safe
dharmatech
Posted a question to the stackoverflow ihp tag: https://stackoverflow.com/questions/69740767/making-a-simple-form-type-safe This one builds on the simple temperature conversion app I posted in my last question. The idea here is to have the …
Add Response
Change location of controller pages
dharmatech
Posted a question to the stackoverflow ihp tag: https://stackoverflow.com/questions/69472377/change-location-of-controller-pages Any suggestions welcome there or here. Thanks! …
Add Response
Define a QueryBuilder by filtering then sorting
dharmatech
Hey y'all, I posted the following to stackoverflow yesterday: Define a QueryBuilder by filtering then sorting No answers so far, so I thought I'd check here so see if anyone has any suggestions. :-) The section Update 1 shows an app…
Add Response
Code Generator dark magic
Gonzalo Muñoz
So I've been trying to follow the docs to make the blog demo, and something caught my attention: there's a code generator, which using only the prompt "Posts" spat out a whole component, pagination included... And I'm …
Add Response
General advice in use cases?
Gonzalo Muñoz
Hi! Newcomer here, both to web development itself, and even more to the Haskell / IHP community (loving it so far, BTW). And I've been wondering wether IHP will be enough for the projects to come. Let's say I need to build an Instag…
Add Response
OverloadedLabels in IHP
dharmatech
Hey y'all, I posted the following question to stackoverflow: https://stackoverflow.com/q/68960202/268581 Fyodor there suggested it may be a bug in the template compiler. Is that something on the IHP side? Or part of some other library w…
Add Response
Hot reload port specification
zhan ishzhanov
Im running ihp in gitpod.io and the localhost gets proxied, so hot reload stops working. I belief the common solution to this is letting users specify hmr port. Ideally the front-end side would just modify the localhost part itself if it de…
Add Response
Alternative project layout in a Razor Pages style
dharmatech
A short (6 minute) video demonstrating that IHP projects can have a different layout that's closer to what you see in an ASP.NET Core Razor Pages project: https://youtu.be/WhCiBZNc15Y The git branches that I reference: https://github.co…
Add Response
IHP is about to get a new Logo 🎨
marc PRO
We're currently reworking some of the visual design of IHP. While it's not yet live, I'm happy to share what the new logo is going to look like: What do you think? …
Add Response
Some Updates to the IHP Forum
marc PRO
Hey, I just pushed an update to the IHP forum. Here's the most important changes: It's now integrated into the main IHP website instead of running at forum.ihpapp.com You can now log in with GitHub If you log in via GitHub you…
Add Response
Haskell Language Server performance
jpe90
Hello! I got started with IHP recently and think it's fantastic so far. One issue I've had is related to the performance of the Haskell Language Server in an IHP project. When it starts up, I've noticed it will peg a few cores o…
Add Response
psql: could not connect to server: No such file or directory
gyan
I was trying to complete the hello world tutorial (blog). After running `./start` file, the server starts and I can see all the pages. However, there is a message - ``` initdb: cannot be run as root Please log in (using, e.g., "su…
Add Response
Slack link is dead?
mt-caret
Hi, sorry for the noise, but I'm trying to join the Slack from the URL https://ihp.digitallyinduced.com/Slack, but I get an error saying "This link is no longer active". Can you update the link? …
Add Response
Creating blog posts using markdown files
harris-chris
Hi - I've recently started using IHP for a personal blog and am finding it a real pleasure so far. One thing that slightly surprises me is that it seems storing the blog posts in the database seems to be the only way to go. This feels a…
Add Response
Using IHP with an existing REST API
runeksvendsen
Hi there, I have developed the backend for a web app as an HTTP API (using Servant + Warp), and I would like to use IHP to develop the web part against this HTTP API. As far as I can see, IHP starts at the database schema level, and generat…
Add Response
IHP Release: 13.12.2020
marc PRO
Time for the next release of IHP: v20201213 🎉 Major Changes Job Queue: We added a new job queue system that allows you to schedule jobs that are going to be executed outside the normal request-response cycle by a job worker running in the…
Add Response
IHP Release: 27.11.2020
marc PRO
It's time for the next release of IHP: v20201030 🎉 This release mainly focus on improving existing functionality and making things more stable :) Since the last release we also reached an important milestone: IHP is now the second bigge…
Add Response
Compile error on 'StaticControllerinstance'
hansw
Hi, I'm following the First App tutorial and I'm running into this error when creating a controller named 'Posts'. What could have gone wrong? And how can I get going again? To reproduce: sudo ihp-new blog sudo chown -R …
Add Response
IHP Release: 30.10.2020
marc PRO
It's time for the next release of IHP: v20201030 🎉 This release mainly focus on improving existing functionality and making things more stable :) Major Changes Database Connection Pool: IHP now comes with a new database connection poo…
Add Response
Setting IHP_EDITOR environment variable
chrisstephenson
I have the latest version of VS Code (on Ubuntu Linux) and I am trying to follow the instructions in the recent video about Haskell integration to VS code. But when I try to get the command to set the environment variable as described in th…
Add Response
IHP Release: 16.10.2020
marc PRO
It's time for the next release of IHP: v20201016 🎉 Major Changes Haskell Language Server Support: You can now get cool IDE features by using Haskell Language Server. It works mostly out of the box after updating to this IHP version. C…
Add Response
IHP Release: 02.10.2020
marc PRO
It's time for the next release of IHP: v20201002 🎉 Major Changes Realtime UI Updates with IHP AutoRefresh: Whenever a INSERT, UPDATE or DELETE happens to the records used by your action IHP will rerun your action on the serverside. Wh…
Add Response
New Release: Beta 18.09.2020
marc PRO
It's time for the next release of IHP: 20200918 🎉 Major Changes Depoyment Documentation: Finally it's here. You can find it inside the Guide. Share your IHP apps with the internet! :). You can find details on how to deploy with IH…
Add Response
HSX: Conversion from Action to Route through ToHtml?
smorfer
I started learning IHP and after finishing the "Your first project" part in the IHP Guide, I saw how actions where used as routes in two ways: <a href={pathTo NewPostAction}><... <a href={ShowPostAction}><...…
Add Response
IHP Release: 04.09.2020 (v20200904)
marc PRO
It's time for the next release of IHP: 20200904 🎉 Major Changes Composite Primary Key Support: You can now use tables that have a primary key consisting of multiple columns. This helps you to handle complex database schemas with IHP.…
Add Response
IHP Release: 21.08.2020 (v21082020)
marc PRO
We've just released a new IHP version! :) Major Changes Numeric Primary Keys Supported: IHP now allows numeric (Serial in Postgres-speak) primary keys. Previously only UUIDs have been supported. UUIDs will still be the default. This f…
Add Response
Open an "IHP Forum" Topic?
I was just wondering if an "IHP Forum" Topic would be a good idea? That way any suggestions/improvements for the IHP Forum could be discussed there. It might also be a place to raise small bug fixes that are too small to justify a…
Add Response
Live Loading Code
I'm finding the live loading in the browser sometimes dies while I'm editing the code. My setup is on MacOs Mojave/Firefox and I'm editing the haskell code directly using VI/nerdtree. The IHP development server is still running …
Add Response
This is the first test thread
marc PRO
Hello World data Bool = True | False deriving (Eq, Show) …
Add Response