diff --git a/controller/redirect.go b/controller/redirect.go
index bf2daaa..e1437d2 100644
--- a/controller/redirect.go
+++ b/controller/redirect.go
@@ -7,14 +7,15 @@ import (
// Redirect to discord
func DiscordRedirect(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
-
http.Redirect(w, r, "https://discordapp.com/invite/0Z2tzxKECEj2BHwj", 301)
-
}
// Redirect to discord
func VPNRedirect(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
-
http.Redirect(w, r, "https://mitchel.io:943", 301)
-
+}
+
+// Redirect to security cameras
+func CameraRedirect(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
+ http.Redirect(w, r, "http://24.118.44.161:8080/html/", 301)
}
diff --git a/public/posts/12-18-15.html b/public/posts/12-18-15.html
index d7dbc88..8a1d4b6 100644
--- a/public/posts/12-18-15.html
+++ b/public/posts/12-18-15.html
@@ -17,7 +17,7 @@
-
For this project you will need an ESP8266 and a DHT temperature sensor. For prototyping purposes I prefer to use the NodeMCU module. There are a variety of temperature sensors that you could use, but I prefer the DHT11 because it is easy to use and it is cheap! I ordered a 5 pack of them from Banggood. The source code for this project can be found on Github. +
For this project you will need an ESP8266 and a DHT temperature sensor. For prototyping purposes I prefer to use the NodeMCU module. There are a variety of temperature sensors that you could use, but I prefer the DHT11 because it is easy to use and it is cheap! I ordered a 5 pack of them from Banggood. The source code for this project can be found on Github.
There were a few other updates that I made. I realized that if the access point the ESP was connected to goes down, it would not try to reconnect. It will now check if it is connected to the access point every time it tries to take a temperature reading and send data. If it is not connected to the access point it will reboot. Now that it reboots, if it still cannot connect to the access point it will be stuck in config mode. I fixed this by creating a timeout. If it has been sitting in config mode for 10 minutes the device will reboot.
-These example are show below. Keep in mind that this is not the entire program, but just the new functionality that I mentioned. The source code for the project can be found here. +
These example are show below. Keep in mind that this is not the entire program, but just the new functionality that I mentioned. The source code for the project can be found here.
- +I previously used the ESP-07, but recently got some new ESP-12e's because of the higher flash size. I thought this would be great if I was going to make use of the file system. After spending hours and hours trying to flash these chips, I came to the conclusion that I need a better serial to USB programmer. The current one that I use came from China and was very cheap. diff --git a/public/posts/resume.html b/public/posts/resume.html index e476621..bf5b289 100644 --- a/public/posts/resume.html +++ b/public/posts/resume.html @@ -83,7 +83,7 @@
diff --git a/readme.md b/readme.md index 6860c0f..dcd4ea5 100644 --- a/readme.md +++ b/readme.md @@ -1 +1,5 @@ -## Converting to Go back end and Angular front end +# Golang Site Implementation + +I have been working on converting my entire website over to the Go programming language. Along with doing this I have also converted the front end entirely to AngularJS. MongoDB is still used and the data base queries have been more optimized. + +I have also made this project open source. Passwords are no longer stored in the code. Rename "config-template.json" to "config.json" to start the server. diff --git a/route/route.go b/route/route.go index dc6105f..5541161 100644 --- a/route/route.go +++ b/route/route.go @@ -23,7 +23,8 @@ func Routes() *httprouter.Router { r.GET("/discord", controller.DiscordRedirect) r.GET("/vpn", controller.VPNRedirect) - + r.GET("/camera", controller.CameraRedirect) + //set up public folder path r.ServeFiles("/public/*filepath", http.Dir("./public"))