All Projects → eckyputrady → Haskell Scotty Realworld Example App

eckyputrady / Haskell Scotty Realworld Example App

Licence: mit
Exemplary real world backend API built with Haskell/Scotty https://realworld.io

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to Haskell Scotty Realworld Example App

Django Rest Framework Tutorial
Django-REST-framework 基本教學 - 從無到有 DRF-Beginners-Guide 📝
Stars: ✭ 630 (+288.89%)
Mutual labels:  restful-api, tutorial
Myapp
🖥️ How to build a Dockerized RESTful API application using Go.
Stars: ✭ 171 (+5.56%)
Mutual labels:  restful-api, tutorial
Rakuguide
The Raku Guide
Stars: ✭ 155 (-4.32%)
Mutual labels:  tutorial
Django Auth Tutorial
Source code for Django authentication tutorial.
Stars: ✭ 160 (-1.23%)
Mutual labels:  tutorial
Validator Badge
Validate your Swagger JSON/YAML today!
Stars: ✭ 158 (-2.47%)
Mutual labels:  restful-api
Restful Api With Laravel Definitive Guide
Repository with the base code for the course "RESTful API with Laravel - Definitive-Guide"
Stars: ✭ 156 (-3.7%)
Mutual labels:  restful-api
Matplotlib Tutorial
Matplotlib tutorial for beginner
Stars: ✭ 2,232 (+1277.78%)
Mutual labels:  tutorial
Ansible Tuto
Ansible tutorial
Stars: ✭ 1,959 (+1109.26%)
Mutual labels:  tutorial
Cmake Tutorial
CMake 官方教程
Stars: ✭ 162 (+0%)
Mutual labels:  tutorial
Docker Espanol
Un tutorial Docker en español. Basado en el libro Docker Cookbook de O'reilly
Stars: ✭ 158 (-2.47%)
Mutual labels:  tutorial
Pharo Wiki
Wiki related to the Pharo programming language and environment.
Stars: ✭ 161 (-0.62%)
Mutual labels:  tutorial
Show Me The Code
Python 练习册,每天一个小程序
Stars: ✭ 12,290 (+7486.42%)
Mutual labels:  tutorial
Boost graph cookbook 1
Boost.Graph Cookbook 1: Basics
Stars: ✭ 157 (-3.09%)
Mutual labels:  tutorial
Reverse Proxy Demo
🛰A demo of how you can easily create a conditional reverse proxy in GO
Stars: ✭ 160 (-1.23%)
Mutual labels:  tutorial
Dippl
The Design and Implementation of Probabilistic Programming Languages
Stars: ✭ 156 (-3.7%)
Mutual labels:  tutorial
Jupyterhub Tutorial
Tutorial materials for deploying JupyterHub
Stars: ✭ 161 (-0.62%)
Mutual labels:  tutorial
Linebottemplate
A simple Golang LINE bot Template and tutorial how to setup on Heroku for LINE bot API
Stars: ✭ 156 (-3.7%)
Mutual labels:  tutorial
Gasyori100knock
image processing codes to understand algorithm
Stars: ✭ 1,988 (+1127.16%)
Mutual labels:  tutorial
Interspeech2019 Tutorial
INTERSPEECH 2019 Tutorial Materials
Stars: ✭ 160 (-1.23%)
Mutual labels:  tutorial
Learnpythonforresearch
This repository provides everything you need to get started with Python for (social science) research.
Stars: ✭ 163 (+0.62%)
Mutual labels:  tutorial

RealWorld Example App

Haskell/Scotty codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.

Demo    RealWorld

Build Status

This codebase was created to demonstrate a fully fledged fullstack application built with Haskell/Scotty including CRUD operations, authentication, routing, pagination, and more.

We've gone to great lengths to adhere to the Haskell/Scotty community styleguides & best practices.

For more information on how to this works with other frontends/backends, head over to the RealWorld repo.

How it works

Environment Variables

Name Desc Default Value
DATABASE_URL PostgreSQL Database URL postgresql://localhost/realworld
ENABLE_HTTPS Server will run on HTTPS if True True
PORT Port 3000
JWK_PATH Path to JWK signature file secrets/jwk.sig
JWT_EXPIRATION_SECS How long until JWT expire (in secs) 7200

Notable Dependencies

  • classy-prelude - Better Prelude for Haskell
  • scotty - Web framework library
  • postgresql-simple - PostgreSQL library
  • aeson - JSON serialization & deserialization
  • digestive-functors & digestive-functors-aeson - Input parsing & validation
  • jose-jwt - JWT encode & decode
  • slug - Slug string builder
  • hspec - Test framework

Quick Repo Walkthrough

  • /postgresql - Database migration scripts.
  • /secrets - Default HTTPS & JWT configuration files for development. Please replace with something else for production.
  • /scripts - Bash scripts to help development.
  • /app - Haskell files for application entry point.
  • /test - Haskell test files.
  • /src - Main Haskell code.

Getting started

Installation

Install Stack.

Install PostgreSQL.

Clone the repository and cd to repo

git clone https://github.com/eckyputrady/haskell-scotty-realworld-example-app.git

cd haskell-scotty-realworld-example-app

Install GHC

stack setup

Install dependencies and build project

stack build

Run project

stack exec realworld-exe

Alternatively, to watch file changes and start the server automatically

./scripts/dev.sh

Alternatively, to watch file changes and run the tests automatically

stack test --file-watch --coverage

To setup deployment to Heroku, please configure this custom buildpack

heroku buildpacks:set https://github.com/mfine/heroku-buildpack-stack

Misc

Logo image - credits to @EricSimmon

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].