From 8fc6bdd874df52338f090ea6165acdbd1323902b Mon Sep 17 00:00:00 2001 From: Joshua Herring Date: Wed, 27 May 2026 12:18:33 -0400 Subject: [PATCH] change to cgi mode - add instructions --- dbi/schema.go | 1 + go.mod | 13 +++++++++++++ main.go | 5 ++++- pages/main_form_page.go | 1 + 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/dbi/schema.go b/dbi/schema.go index 5deef6f..4f7bbbd 100644 --- a/dbi/schema.go +++ b/dbi/schema.go @@ -5,6 +5,7 @@ CREATE TABLE users ( APIKey text not null, FirstName text not null, LastName text not null, + Password text not null, Status text not null CHECK (Status in ('faculty', 'admin')), Username text PRIMARY KEY ); diff --git a/go.mod b/go.mod index 8ab3d6a..c5ea373 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,16 @@ module faculty_media_report go 1.26 + +require ( + github.com/dustin/go-humanize v1.0.1 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/ncruces/go-strftime v1.0.0 // indirect + github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect + golang.org/x/sys v0.42.0 // indirect + modernc.org/libc v1.72.3 // indirect + modernc.org/mathutil v1.7.1 // indirect + modernc.org/memory v1.11.0 // indirect + modernc.org/sqlite v1.50.1 // indirect +) diff --git a/main.go b/main.go index f3d9b6c..7151cb3 100644 --- a/main.go +++ b/main.go @@ -4,7 +4,7 @@ import ( "fmt" "net/http" "net/http/cgi" - "os" + _ "os" "faculty_media_report/pages" ) @@ -15,6 +15,8 @@ func handler(w http.ResponseWriter, r *http.Request) { } func main() { + cgi.Serve(http.HandlerFunc(handler)) + /* if os.Getenv("GATEWAY_INTERFACE") != "" { cgi.Serve(http.HandlerFunc(handler)) } else { @@ -22,4 +24,5 @@ func main() { fmt.Fprintln(os.Stderr, "Running in standalone mode on :9001") http.ListenAndServe(":9001", nil) } + */ } diff --git a/pages/main_form_page.go b/pages/main_form_page.go index a9e17cd..56fcca5 100644 --- a/pages/main_form_page.go +++ b/pages/main_form_page.go @@ -37,6 +37,7 @@ const MainFormPage = `

Faculty Public Activity Report

+

The Faculty Public Activity Report portal is a way for you to keep the school up to date with your recent scholarship, talks, media appearances and other activities related to your academic career. Below you will find three categories of input form: Scholarship — for academic papers, articles and other publications; Talks and Activities — for conference talks and other public appearances; Media Appearances — for media interviews, profiles and other reports that feature your work. To add an item, simply type in the fields in the relevant section. A button labeled "Save Item" will appear. Click this button when you are finished to add it to the list. You may edit or remove items at any time. Click the "Review and Submit" button to see the final list and submit it to the Associate Dean for Research and Faculty Affairs. Thank you for keeping us informed!