pg_eventserv icon indicating copy to clipboard operation
pg_eventserv copied to clipboard

Educational resorces share + bonus debian build

Open syonfox opened this issue 1 year ago • 0 comments

Hi cool tech learned about this from the https://mapscaping.com/podcast/postgresql-listen-and-notify-clients-in-real-time/ podcast so maybe some people are looking for additional context.

Thanks for the clean project this one is better then most for getting started. still have to grasp the full technical side in pg as I'm moving from js to pg rather then the other way :smiley_cat:

Also just getting this up and running and though i would share my build script for debian

Build script tested on `SMP Debian 5.10.191-1 (2023-08-16) x86_64 GNU/Linux`


#!/bin/bash
# This is a shell script to set up and build the pg_eventserv project.

# Install PostGIS using apt
sudo apt install postgis

# Create a directory for your project and navigate to it
mkdir pgev
cd pgev/

# Start the PostgreSQL service
sudo service postgresql start

# Check the status of the PostgreSQL service
sudo service postgresql status

# Clone the pg_eventserv repository from GitHub
git clone https://github.com/CrunchyData/pg_eventserv.git
cd pg_eventserv/

# List the contents of the project directory
ls

# Compile the project
make

# Build the project
make build

# Add the Go plugin to asdf (assuming you have asdf installed)
asdf plugin-add go

# Add the Golang plugin to asdf
asdf plugin-add golang

# Install a specific version of Golang (1.20.4 in this case)
asdf install golang 1.20.4

# Set the local version of Golang to 1.20.4
asdf local golang 1.20.4

# Build the project
make build

./pg_eventserv --help

syonfox avatar Nov 07 '23 18:11 syonfox