Decentralized dating platform
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.8 KiB

package main
import (
"github.com/go-fed/apcore"
"github.com/go-fed/apcore/app"
)
// Copyright (C) 2019 Cory Slep
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
func main() {
// Build an instance of our struct that satisfies the Application
// interface.
//
// Implementing the Application interface is where most of the work
// to use the framework lies.
//
// go-fed/apcore provides a very quick-to-implement but vanilla
// ActivityPub framework. It is a convenience layer on top of
// go-fed/activity, which has the opposite philosophy: assume as little
// as possible, provide more powerful but time-consuming interfaces to
// satisfy.
var a app.Application
var e error
a, e = newApplication("templates/*.tmpl")
if e != nil {
panic(e)
}
// Run the apcore framework.
//
// Depending on the command line flags chosen, an action can occur:
// - Configuring the application and generating a config file
// - Initializing a database
// - Initializing an admin account in the database
// - Launching the example App to serve live web & ActivityPub traffic
//
// All of these capabilities are supported by the framework out of the
// box. Refer to the command line help for more details.
apcore.Run(a)
}