// Run the listener and request's router, activate rest server
// this server doesn't have any authentication and SHOULDN'T BE EXPOSED in any way
Run the listener and request's router, activate rest server
this server doesn't have any authentication and SHOULDN'T BE EXPOSED in any way
// Run the listener and request ' s router activate rest server // this server doesn ' t have any authentication and SHOULDN ' T BE EXPOSED in any way
func (m *Migrator) Run(port int) {
	log.Printf("[INFO] activate import server on port %d", port)
	router := m.routes()
	m.lock.Lock()
	m.httpServer = &http.Server{Addr: fmt.Sprintf("127.0.0.1:%d", port), Handler: router}
	m.lock.Unlock()
	err := m.httpServer.ListenAndServe()
	log.Printf("[WARN] http server terminated, %s", err)
}
func ( m * Migrator ) Run ( port int ) { log . Printf ( " " , port ) router := m . routes ( ) m . lock . Lock ( ) m . httpServer = & http . Server { Addr : fmt . Sprintf ( " " , port ) , Handler : router } m . lock . Unlock ( ) err := m . httpServer . ListenAndServe ( ) log . Printf ( " " , err ) }
Run the listener and request's router, activate rest server
this server doesn't have any authentication and SHOULDN'T BE EXPOSED in any way
Run the listener and request ' s router activate rest server this server doesn ' t have any authentication and SHOULDN ' T BE EXPOSED in any way