GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - typeonce-dev/effect-backend-example: Example of backend API written with effect that connects to a SQL database (included local Docker configuration with postgres and PgAdmin) ⚡️

BranchesTags
Open more actions menu

Latest commit

 

History

11 Commits
11 Commits

Folders and files

NameName
Last commit message
Last commit date
.vscode
.vscode
 
 
apps
apps
 
 
packages/api
packages/api
 
 
.env.example
.env.example
 
 
.gitignore
.gitignore
 
 
.npmrc
.npmrc
 
 
README.md
README.md
 
 
docker-compose.yaml
docker-compose.yaml
 
 
package.json
package.json
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
pnpm-workspace.yaml
pnpm-workspace.yaml
 
 
turbo.json
turbo.json
 
 

Repository files navigation

How to implement a backend with Effect

@effect/platform provides a type safe API for building backend apps. Any runtime, any database, and with all the features you expect from a TypeScript backend.

Check out the full article to learn how to get started 🚀

Getting started

This repository includes the following:

  • Shared effect API definition (packages/api)
  • Backend implementation with effect (apps/server)
  • Frontend implementation with TanStack Router (apps/client)
  • Docker compose for local Postgres + PgAdmin environment (docker-compose.yaml)

First, open Docker Desktop and execute the below command to start the database and PgAdmin:

Make sure to create a .env file inside both the root directory and apps/server, containing the parameters listed inside .env.example.

docker compose up

This will start the database and PgAdmin. You can access http://localhost:5050/ to login into the local PgAdmin dashboard.

Use the credentials from .env: PGADMIN_MAIL+PGADMIN_PW.

You can then execute both server and client in the monorepo. Open a second terminal and run the below commands:

pnpm install
pnpm run dev

This will start client on http://localhost:3001/, and server on http://localhost:3000/.

Done ✨

Server, client, and database all now all connected. Explore more of the effect API by playing around with the code in the repository 🕹️

Check out the full article for the details of how the code works 🚀

About

Example of backend API written with effect that connects to a SQL database (included local Docker configuration with postgres and PgAdmin) ⚡️

Topics

apibackendeffecteffect-tspgadminpostgres-databasepostgresql

Resources

Readme
Activity
Custom properties

Stars

29 stars

Watchers

2 watching

Forks

3 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.