From fd43c61bd128ad77b22db0537a9a4eb58490b0b5 Mon Sep 17 00:00:00 2001 From: Ben Morrison Date: Wed, 5 Jun 2019 15:36:23 -0400 Subject: moved bulk of code to its own package to clean up source tree --- init_test.go | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 init_test.go (limited to 'init_test.go') diff --git a/init_test.go b/init_test.go deleted file mode 100644 index bffe036..0000000 --- a/init_test.go +++ /dev/null @@ -1,27 +0,0 @@ -package main - -import ( - "fmt" - "log" - "os" -) - -var testport = fmt.Sprintf(":%v", confObj.Port) -var hasInit = false - -func initTestConf() { - if !hasInit { - initConfig() - tmpls = initTemplates() - logToNull() - hasInit = true - } -} - -func logToNull() { - hush, err := os.Open("/dev/null") - if err != nil { - log.Printf("%v\n", err) - } - log.SetOutput(hush) -} -- cgit 1.4.1-2-gfad0 > twtxt registry written in Gogbmor <ben@gbmor.dev>
summary refs log tree commit diff stats
path: root/getwtxt.yml
blob: fb05a96357bd0d50d731787b9c033f26ba23ac1b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#############################################################
##  This config file can live in the following locations:  ##
##                                                         ##
##      ./                                                 ##
##      /usr/local/getwtxt/                                ##
##      /etc/                                              ##
##      /usr/local/etc/                                    ##
##                                                         ##
##  The first location found wins. The default filename    ##
##  is getwtxt.yml. This can be configured via command     ##
##  line flags:                                            ##
##                                                         ##
##  For "myconfig.json"                                    ##
##    ./getwtxt -config myconfig -type json                ##
##                                                         ##
#############################################################

#############################################################
##  Changing the following options requires a restart.     ##
#############################################################

# This is the port that getwtxt will bind to.
ListenPort: 9001

# The type of database you want to use. Currently,
# the following are supported:
#   leveldb
DatabaseType: "leveldb"

# The location of the database structure. Can be
# a relative or absolute path.
DatabasePath: "getwtxt.db"

#############################################################
##  The following options may be changed at any time.      ##
##  getwtxt will automatically reload the config when      ##
##  changes are detected.                                  ##
#############################################################

# If true, getwtxt will send all log messages, including
# requests, to stdout. It will ignore any set log file.
# Useful for debugging, but you probably want to keep
# logs.
StdoutLogging: false

# The file getwtxt will append log messages to. Can be a
# relative or absolute path.
LogFile: "getwtxt.log"

# This is the interval between data pushes from the 
# in-memory cache to the on-disk database. 
DatabasePushInterval: "5m"

# The time getwtxt will wait between attempts to scrape
# users' statuses from their twtxt.txt files
StatusFetchInterval: "1h"

# The following options pertain to your particular instance.
# They are used in the default page shown when you visit
# getwtxt in a web browser.
Instance:

  # The name of your instance.
  SiteName: "getwtxt"

  # Your instance's web address.
  URL: "https://twtxt.example.com"

  # Your name. 
  OwnerName: "Anonymous Microblogger"
  
  # Your email address.
  Email: "nobody@knows"

  # A short description of your instance, or your site.
  # This is shown at the top of the default web page
  # below your instance's name.
  Description: "A fast, resilient twtxt registry server written in Go!"