What is the best server to host a Haskell web page (HSP)?

I need to configure a server that can host a website created by Haskell. If I use PHP, I can host it on an Apache server. Similarly, if I create a Haskell thing, which suitable web servers can I use? I tried several, but most of them ended up in error. Please give me some details to set up a web server running Haskell.

A basic need is to create a dynamic website based on the Haskell programming language.

+3
source share
3 answers

As a rule, haskell is not served through the Apache module. You either configure the cgi or fcgi executable, and then use apache, nginix, etc. to invoke this, or use a framework like snap or happstack, which provides its own server. Then you don't need apache, nginix or anything else unless you want to use it as a proxy server (for example, to provide https).

For help, see the web category on the Haskell Wiki: http://www.haskell.org/haskellwiki/Web

Edit: to run hsp, the hsp-cgi package works: http://hackage.haskell.org/package/hsp-cgi

hsp ( cgi , ..), happstack - , , hsp, .

+1
+5

You should be able to tell Apache how to process haskell files in the same way that Apache passes php files to the PHP interpreter. So, think about the file extension of your haskell files, and then look at the Apache documentation on file filters / endings to let you know that such files should be transferred through your favorite Haskell interpreter.

0
source

Source: https://habr.com/ru/post/1776380/


All Articles