Skip to content

Instantly share code, notes, and snippets.

@kanzitelli
Created September 11, 2019 15:20
Show Gist options
  • Save kanzitelli/fdef3139a3046376332dab43b16f29d1 to your computer and use it in GitHub Desktop.
Save kanzitelli/fdef3139a3046376332dab43b16f29d1 to your computer and use it in GitHub Desktop.
Server/Server.go. #2
package server
import (
)
// Init <function>
// is used to initialize server and all the corresponding services such as DB, Utils, Workers
func Init() {
// utils
utils.InitEnvVars()
// services
db.InitService()
db.GetClient().FillSeedsInformation() // a bit ugly but everything is going to work, only needed to fill seeds information
// workers
crawler.Start()
r := NewRouter()
// r.Run(":6969")
r.Run(":80")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment