Created
September 11, 2019 15:20
-
-
Save kanzitelli/fdef3139a3046376332dab43b16f29d1 to your computer and use it in GitHub Desktop.
Server/Server.go. #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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