1
0
mirror of https://github.com/mgerb/tmail synced 2026-01-11 18:12:48 +00:00
This commit is contained in:
2018-02-01 12:01:05 -06:00
commit a6af3d11e2
9 changed files with 294 additions and 0 deletions

37
main.go Normal file
View File

@@ -0,0 +1,37 @@
package main
import (
"os"
"github.com/asdine/storm"
"github.com/mgerb/tmail/db"
"github.com/mgerb/tmail/smtpserver"
"github.com/mgerb/tmail/webserver"
log "github.com/sirupsen/logrus"
)
//DB - database instance
var DB *storm.DB
func init() {
// Log as JSON instead of the default ASCII formatter.
log.SetFormatter(&log.JSONFormatter{})
// Output to stdout instead of the default stderr
// Can be any io.Writer, see below for File example
log.SetOutput(os.Stdout)
// Only log the warning severity or above.
log.SetLevel(log.DebugLevel)
}
func main() {
db.Init()
defer db.Conn.Close()
// start webserver
go webserver.Start()
// start smtp server
smtpserver.Start()
}