Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a minimal servant-server project as a template #420

Closed
soenkehahn opened this issue Mar 21, 2016 · 9 comments
Closed

Provide a minimal servant-server project as a template #420

soenkehahn opened this issue Mar 21, 2016 · 9 comments

Comments

@soenkehahn
Copy link
Contributor

This should live in its own github repo and probably include:

  • cabal file,
  • stack file,
  • src directory with a minimal API and a server,
  • test directory with a minimal test-suite using either servant-client or hspec-wai.
@alpmestan
Copy link
Contributor

Great idea.

@rvion
Copy link
Contributor

rvion commented Mar 21, 2016

yes, and it would be great to have it either

  • submitted to stack-templates.
  • compatible with stack templates by pointing stack new to use servant repo as template catalog repo

@alexanderkjeldaas
Copy link
Contributor

There is already some support in stack-templates now:

commercialhaskell/stack-templates@bd7b20e

What's nice about that template is that it enables letsencrypt.org by default.

Maybe this work could be merged with that template.

@arianvp
Copy link
Member

arianvp commented Mar 25, 2016

@alexanderkjeldaas interesting. Maybe a bit offtopic. but why choose to put nginx in front of the app instead of letting warp use the letsencrypt cert directly?

@alexanderkjeldaas
Copy link
Contributor

The nginx docker container has an existing sidecar for letsencrypt.

I also think it is a bad idea not to have a HTTP load balancer in front of a backend in any production setup, and SSL termination has to happen at the load balancer.

@soenkehahn
Copy link
Contributor Author

I've opened this PR: commercialhaskell/stack-templates#52
It's for servant-0.4 since stack new doesn't support templates with stack files in it. (See a discussion here: https://groups.google.com/d/topic/haskell-stack/sOI5rY28G3E/discussion)

Once servant-0.5 is on stackage, we can of course update the template. (commercialhaskell/stackage#1290)

@soenkehahn
Copy link
Contributor Author

I've created an example project here: https://github.com/haskell-servant/example-servant-minimal

@soenkehahn
Copy link
Contributor Author

I also created a section about example projects in the documentation: #471. If we merge this, I would consider this issue solved.

@jkarni
Copy link
Member

jkarni commented Apr 20, 2016

Closing since #471 had been merged.

@jkarni jkarni closed this as completed Apr 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants