change to cgi mode - add instructions

master
Joshua Herring 3 weeks ago
parent 1c5cc253a6
commit 8fc6bdd874

@ -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
);

@ -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
)

@ -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)
}
*/
}

@ -37,6 +37,7 @@ const MainFormPage = `<!DOCTYPE html>
<!-- Input view -->
<div id="input-view">
<h1 class="rvt-ts-xxl rvt-m-bottom-xxl">Faculty Public Activity Report</h1>
<p>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: <strong>Scholarship</strong> &mdash; for academic papers, articles and other publications&semi; <strong>Talks and Activities</strong> &mdash; for conference talks and other public appearances&semi; <strong>Media Appearances</strong> &mdash; 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!</p>
<form method="post" id="report-form">

Loading…
Cancel
Save