691e51660f2e87ed2ce778da92ef000db6b31654
				
			
			
		
	 James Eversole
		
	
	691e51660f
	
	
	Reintroduce Debugging database handler; update main to allow for environment definition that will branch between all debug handlers or real effect handlers
			James Eversole
		
	
	691e51660f
	
	
	Reintroduce Debugging database handler; update main to allow for environment definition that will branch between all debug handlers or real effect handlers
		
	
servant-effectful-template
A work in progress Nix starting template for web projects utilizing
The repository has a simple CRUD implementation of a "Users" API which demonstrates how to use included effects, create your own effects, write/compose HTML using Lucid, and bubble errors to Servant's ServerError type.
How to navigate this codebase (as of revision 77131c4a):
- Core
- Application data types
- Effect definitions
- Utility function for lifting IO to effectful's IOE
 
- Database
- Database effect handler
- Table definitons as functions
- Helper functions for constructing SQL queries
 
- Handlers
- Request handlers in the Eff monad
 
- Logger
- Logging implementation using the Database effect for logging to PSQL
- Logging implementation to stdout
 
- Main
- Application entry point and initialization
- Creates a PostgreSQL connection pool to include in the Reader effect
- Effect stack runner for real database interactions
- Debugging effect stack that mocks database interactions and logs to stdout instead
 
- Routes
- Type level route definitions for Servant
 
- Views
- Lucid2 HTML templating and composition functions
 
Description
				
					Languages
				
				
								
								
									Haskell
								
								89.3%
							
						
							
								
								
									Nix
								
								10.7%