feat: database as plugin
This commit is contained in:
12
cli/main.go
12
cli/main.go
@@ -27,11 +27,13 @@ func init() {
|
||||
|
||||
func getProxy(getOptions func() (npmproxy.Options, error)) *npmproxy.Proxy {
|
||||
return &npmproxy.Proxy{
|
||||
RedisClient: redis.NewClient(&redis.Options{
|
||||
Addr: persistentOptions.RedisAddress,
|
||||
DB: persistentOptions.RedisDatabase,
|
||||
Password: persistentOptions.RedisPassword,
|
||||
}),
|
||||
Database: npmproxy.DatabaseRedis{
|
||||
Client: redis.NewClient(&redis.Options{
|
||||
Addr: persistentOptions.RedisAddress,
|
||||
DB: persistentOptions.RedisDatabase,
|
||||
Password: persistentOptions.RedisPassword,
|
||||
}),
|
||||
},
|
||||
HttpClient: &http.Client{
|
||||
Transport: http.DefaultTransport,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user