-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
40 lines (33 loc) · 1.09 KB
/
main.go
File metadata and controls
40 lines (33 loc) · 1.09 KB
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
// Copyright 2018 Portal Direc's authors. All rights reserved.
//
// Authors: Rafael Campos Nunes <rafaelnunes@alunos.utfpr.edu.br>
// ... <email>
//
// Use of this source code is governed by a Apache License. The license can be
// found (LICENSE) at the root of the project.
// DOCUMENTATION
// ---------------------------------------------------------------------------
// The entry point to the entire system. It interprets flags and start the
// server at a desired <port> value, here called of address, or if no port
// value is assigned the default one is 8080.
package main
import (
"flag"
)
var (
addr string
html string
debug bool
deploy bool
)
func init() {
flag.StringVar(&addr, "p", "8080", "Set port address used to start the server")
flag.StringVar(&html, "html", "./html/_site", "Set the default directory for Jekyll output files")
flag.BoolVar(&debug, "d", false, "Set if the server is in debug mode")
flag.BoolVar(&deploy, "deploy", false, "Deploy the server over the network")
}
func main() {
flag.Parse()
//Init the server at port address
Init(addr)
}