I am looking to deploy a dynamic web application with backend written in Go and MySQL. I read that hosting it on Google App Engine would work, but there are other solutions as AWS or Heroku.
Could you please help me through it and give me the steps that I need to make? Here is a part of my code:
package main
import (
"http://ift.tt/J9WoXt"
"html/template"
"log"
"net/http"
_ "http://ift.tt/1kNPaoi"
"database/sql"
"fmt"
"http://ift.tt/1dxgVot"
"io"
"os"
"encoding/base64"
"strings"
//"http://ift.tt/1HDShL0"
)
func init() {
router := mux.NewRouter()
router.HandleFunc("/", home_page)
router.HandleFunc("/companypage/account.html", cmpy_account_page)
router.HandleFunc("/companypage/mainpage.html", cmpy_main_page)
router.HandleFunc("/studentpage/account.html", std_account_page)
router.HandleFunc("/studentpage/mainpage.html", std_main_page)
router.HandleFunc("/logout", logout)
router.HandleFunc("/forgotp", forgotp)
router.HandleFunc("/companypage/edit-account.html", cmpy_edit_pos)
router.HandleFunc("/delete_pos", delete_pos).Methods("Post")
router.HandleFunc("/update_account", update_account).Methods("Post")
router.HandleFunc("/upload_pic", upload_pic).Methods("Post")
router.HandleFunc("/add_pos", add_pos).Methods("Post")
router.HandleFunc("/register_user", register_user).Methods("Post")
router.HandleFunc("/login_company", login).Methods("Post")
router.HandleFunc("/register_company", register_company).Methods("Post")
router.HandleFunc("/login_user", login).Methods("Post")
router.PathPrefix("/").Handler(http.StripPrefix("/", http.FileServer(http.Dir("/users/khalilbenayed/go/src/hello/projects/startconnectmaster"))))
log.Println("Listening...")\
http.ListenAndServe(":3009", router)
}
Aucun commentaire:
Enregistrer un commentaire