Skip to content

I created this project in one of my classes Spring 2016. I decided to make a dynamic website using the C programming language. With permission I used a friend's Hibernate/JAX-RS API, and edited it to be compatible with the database for this project. The website is a basic login detail that uses an HTTP GET request to confirm that the user is log…

License

demonslab/CGI_Website_In_C

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

CGI_Website_In_C

I created this project in one of my classes Spring 2016. I decided to make a dynamic website using the C programming language. With permission I used a friend's Hibernate/JAX-RS API, and edited it to be compatible with the database for this project. The website is a basic login detail that uses an HTTP GET request to confirm that the user is logged in, and when they are, it would display the most recent temperature values that were in the database. My friend wrote the temperature sensor program using an Arduino, that pushed the data to the database. The entire project was run on my personal server that I built January 2016. Also the CSS this uses is what I use for my website.

There are a lot of wierd things to note about this project, but the main thing I would like to stress is that I will NEVER recommend ANYONE to EVER make a website in C. Think of it as painfully verbose HTML, which I feel is technically verbose on it's own. I did this for a project because I thought it was wierd and it'd be cool, and because I realized how wierd it was, I decided not to implement every feature that is displayed on the webpage. I also should have

The webpage URL that this is currently running on is http://avarizia.duckdns.org/temp-cgi/login.cgi, with the Username being player1 and password being password. This will allow you to see how it looks, especially because I kept the layout of that webpage consistent with the rest. As stated above, I run that webpage on my personal server, though the website itself is pretty much empty right now. Hopefully I'll decide to do something cool with it eventually, but for now it is what it is.

Notes on implementation: I realized after finishing the JSON parser that I have two functions for making a linked list of Strings. I hosnestly don't know where my mind was when I wrote it, but it happened. Also, when getting the temperature JSON Array, I had to use a second pointer to reestablish all of the links because the program was Seg-faulting when I ran it on my server, which runs Ubuntu Server 14.04, with the most current version of GCC at the time for that OS. It worked completely fine without it on the Debian VM I have on my Macbook Pro, which I believe had a later version of GCC installed, but I digress. This project was created to work on the webserver utilizing CGI, not for generating HTML based on hardcoded inputs. For this, I was successful, and also pretty proud of myself for using what I call object-oriented C to parse the JSONs retrieved from the API.

The documentation contains everything one should need to recreate the database, as well as further information on the wierd errors that I had to fix.

About

I created this project in one of my classes Spring 2016. I decided to make a dynamic website using the C programming language. With permission I used a friend's Hibernate/JAX-RS API, and edited it to be compatible with the database for this project. The website is a basic login detail that uses an HTTP GET request to confirm that the user is log…

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published