journal post about cgi-application

This commit is contained in:
James Tomasino 2022-02-21 14:49:14 +00:00
parent edaac5ee45
commit 1275fbfba9
4 changed files with 35 additions and 2 deletions

View File

@ -4,7 +4,7 @@
<title>tomasino@tilde.team</title>
<link rel="alternate" href="gemini://tilde.team/~tomasino/"/>
<link rel="self" href="gemini://tilde.team/~tomasino/atom.xml" />
<updated>2022-02-14T12:37:00Z</updated>
<updated>2022-02-21T01:23:00Z</updated>
<id>gemini://tilde.team/~tomasino/</id>
<author>
@ -12,6 +12,12 @@
<uri>gemini://tilde.team/~tomasino/about.txt</uri>
</author>
<entry>
<title>Sample CGI Application</title>
<link href="gemini://tilde.team/~tomasino/journal/20220221-sample-cgi-application.gmi"/>
<id>gemini://tilde.team/~tomasino/journal/20220221-sample-cgi-application.gmi</id>
<updated>2022-02-21T01:23:00Z</updated>
</entry>
<entry>
<title>DANE and TLS</title>

View File

@ -16,10 +16,10 @@
## Recent Journal Entries
=> /~tomasino/journal/ All Entries
=> /~tomasino/journal/20211102-freedom.gmi 2021-11-02 Freedom
=> /~tomasino/journal/20211103-making-gemini-easy.gmi 2021-11-03 Making Gemini Easy
=> /~tomasino/journal/20211227-gemini-input.gmi 2021-12-27 Gemini Inputs
=> /~tomasino/journal/20220214-dane-and-tls.gmi 2022-02-14 DANE and TLS
=> /~tomasino/journal/20220221-sample-cgi-application.gmi 2022-02-21 Sample CGI Application
## Role Playing Games

View File

@ -0,0 +1,26 @@
# A Sample CGI Application
Tonight I put together a sample CGI application on tilde.team that demonstrates how to handle basic user management and data. It even allows you to attach additional client certificates to the account by means of an authorization code. Once I clean it up a bit I'll be creating a new video that walks through everything in detail. It will be the successor to my "Gemini Input" video.
=> gemini://tilde.team/~tomasino/cgi-example/ A Sample CGI Application
=> https://www.youtube.com/watch?v=9Anh0sNUCY4 Gemini Input (YouTube Link)
It's written in python and hosted on a tilde to show what's possible even in a shared hosting environment.
There's caveats galore on this:
* My code was written stream of consciousness and isn't well structured or documented yet.
* Using sqlite on a shared host has some security issues since the database and parent folder need to be writable by the gemini user.
* I'm not generating cryptographically secure auth-codes for adding new client certs, nor am I checking that they're unique like I should.
* I'm not a python programmer, so I probably butchered some things out of ignorance.
Even with all that I hope it will be useful to folks that want to start creating Gemini CGI apps. If you have comments to share on the code, please feel free to shoot me a note or comment directly on tildegit. I will happily accept pull requests. :)
=> https://tildegit.org/tomasino/gemspace/src/branch/master/cgi-example tildegit repo for the CGI application example
Originally Published 2022-02-21 at:
gemini://tilde.team/~tomasino/journal/20220221-sample-cgi-application.gmi
If you have questions or thoughts to add please send me a link to your response.
=> /~tomasino/about.txt Contact Information

View File

@ -24,3 +24,4 @@
=> /~tomasino/journal/20211103-making-gemini-easy.gmi 2021-11-03 Making Gemini Easy
=> /~tomasino/journal/20211227-gemini-input.gmi 2021-12-27 Gemini Inputs
=> /~tomasino/journal/20220214-dane-and-tls.gmi 2022-02-14 DANE and TLS
=> /~tomasino/journal/20220221-sample-cgi-application.gmi 2022-02-21 Sample CGI Application