github.com/jancarloviray/community@v0.41.1-0.20170124221257-33a66c87cf2f/cmd/documize-community/documize.go (about)

     1  // Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
     2  //
     3  // This software (Documize Community Edition) is licensed under
     4  // GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
     5  //
     6  // You can operate outside the AGPL restrictions by purchasing
     7  // Documize Enterprise Edition and obtaining a commercial license
     8  // by contacting <sales@documize.com>.
     9  //
    10  // https://documize.com
    11  
    12  // This package provides Documize as a single executable.
    13  package main
    14  
    15  import (
    16  	"github.com/documize/community/core/api/endpoint"
    17  	"github.com/documize/community/core/environment"
    18  	"github.com/documize/community/core/section"
    19  
    20  	_ "github.com/documize/community/embed" // the compressed front-end code and static data
    21  
    22  	_ "github.com/go-sql-driver/mysql" // the mysql driver is required behind the scenes
    23  )
    24  
    25  func main() {
    26  	environment.Parse("db")         // process the db value first
    27  	ready := make(chan struct{}, 1) // channel is used for testing
    28  
    29  	section.Register()
    30  
    31  	endpoint.Serve(ready)
    32  }