Initial release
This commit is contained in:
24
config/config.go
Normal file
24
config/config.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"github.com/joho/godotenv"
|
||||
"os"
|
||||
)
|
||||
|
||||
var (
|
||||
ArticleRoot string
|
||||
|
||||
ServerPort string
|
||||
|
||||
DatabaseFile string
|
||||
)
|
||||
|
||||
func init() {
|
||||
godotenv.Load()
|
||||
|
||||
ArticleRoot = os.Getenv("ARTICLE_ROOT")
|
||||
|
||||
ServerPort = os.Getenv("SERVER_PORT")
|
||||
|
||||
DatabaseFile = os.Getenv("DATABASE_FILE")
|
||||
}
|
||||
Reference in New Issue
Block a user