package main

import (
	"fmt"

	"github.com/spf13/viper"
)

func main() {
	viper.SetConfigName("config")
	viper.SetConfigType("json")
	viper.AddConfigPath(".")

	if err := viper.ReadInConfig(); err != nil {
		panic(err)
	}

	fmt.Printf("App Name: %s\n", viper.GetString("app.name"))
	fmt.Printf("App Port: %d\n", viper.GetInt("app.port"))
}
