<commit_before>package main

import (
	"fmt"
	"github.com/MG-RAST/Shock/conf"
	"github.com/MG-RAST/Shock/goweb"
)

func main() {
	goweb.ConfigureDefaultFormatters()
	goweb.MapFunc("/resources", ResourceDescription)
	goweb.MapFunc("/raw", RawDir)
	goweb.MapFunc("/assets", AssetsDir)
	goweb.MapRest("/node", new(NodeController))
	goweb.MapRest("/user", new(UserController))
	goweb.MapFunc("*", Site)
	fmt.Printf("Shock (port:%d, dataroot:%q, mongodb_host:%q, secretkey:%q)... starting\n", *conf.PORT, *conf.DATAROOT, *conf.MONGODB, *conf.SECRETKEY)
	goweb.ListenAndServe(":" + fmt.Sprintf("%d", *conf.PORT))
}<commit_msg>site listening on :80, api on user defined, added logo to startup<commit_after>package main

import (
	"fmt"
	"github.com/MG-RAST/Shock/conf"
	"github.com/MG-RAST/Shock/goweb"
)

func main() {
	fmt.Printf("%s\n######### Conf #########\ndata-root:\t%s\nmongodb:\t%s\nsecretkey:\t%s\nsite-port:\t80\napi-port:\t%d\n\n####### Starting #######\n", logo, *conf.DATAROOT, *conf.MONGODB, *conf.SECRETKEY, *conf.PORT)

	c := make(chan int)
	goweb.ConfigureDefaultFormatters()
	// start site
	go func() {
		r := &goweb.RouteManager{}
		r.MapFunc("/raw", RawDir)
		r.MapFunc("/assets", AssetsDir)
		r.MapFunc("*", Site)
		c <- 1
		goweb.ListenAndServeRoutes(":80", r)
		c <- 1
	}()
	<-c
	fmt.Printf("site :80... running\n")

	// start api
	go func() {
		r := &goweb.RouteManager{}
		r.MapRest("/node", new(NodeController))
		r.MapRest("/user", new(UserController))
		r.MapFunc("*", ResourceDescription, goweb.GetMethod)
		c <- 1
		goweb.ListenAndServeRoutes(fmt.Sprintf(":%d", *conf.PORT), r)
		c <- 1
	}()
	<-c
	fmt.Printf("api  :%d... running\n", *conf.PORT)
	fmt.Printf("\n######### Log  #########\n")
	<-c
}
{'fraction_non_alphanumeric': 0.23009877977919815, 'fraction_numerical': 0.006972690296339338, 'mean_word_length': 4.484076433121019, 'pattern_counts': {'":': 3, '<': 10, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '333596', 'n_tokens_mistral': 739, 'n_tokens_neox': 708, 'n_words': 118}