mirror of
https://github.com/EQEmu/eqemu-docs-v2.git
synced 2026-08-08 17:45:09 -04:00
30 lines
462 B
Go
30 lines
462 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
|
|
"github.com/EQEmu/eqemu-docs-v2/internal/console"
|
|
"github.com/EQEmu/eqemu-docs-v2/internal/http"
|
|
"github.com/joho/godotenv"
|
|
)
|
|
|
|
func main() {
|
|
// load .env
|
|
err := godotenv.Load()
|
|
if err != nil {
|
|
log.Fatal("Error loading .env file")
|
|
}
|
|
|
|
// if args passed, run console
|
|
if len(os.Args) > 1 {
|
|
err := console.Run()
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
return
|
|
}
|
|
|
|
// if no args passed, run web server
|
|
http.Run()
|
|
}
|