<commit_before>// SPDX-License-Identifier: MIT

package web

import (
	"net/http"

	"github.com/issue9/logs/v2"

	"github.com/issue9/web/server"
)

type (
	Server      = server.Server
	Context     = server.Context
	Options     = server.Options
	Filter      = server.Filter
	Module      = server.Module
	Tag         = server.Tag
	HandlerFunc = server.HandlerFunc
)
<commit_msg>feat: 添加 DefaultServer 用于返回一个全部采用默认值初始化的 Server 实例<commit_after>// SPDX-License-Identifier: MIT

package web

import (
	"net/http"

	"github.com/issue9/logs/v2"

	"github.com/issue9/web/server"
)

type (
	Server      = server.Server
	Context     = server.Context
	Options     = server.Options
	Filter      = server.Filter
	Module      = server.Module
	Tag         = server.Tag
	HandlerFunc = server.HandlerFunc
)

// DefaultServer 返回一个采用默认值进初始化的 *Server 实例
func DefaultServer(name, version, url string) (*Server, error) {
	return NewServer(name, version, logs.New(), &Options{Root: url})
}

{'fraction_non_alphanumeric': 0.11180124223602485, 'fraction_numerical': 0.006211180124223602, 'mean_word_length': 3.1502145922746783, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3647746', 'n_tokens_mistral': 351, 'n_tokens_neox': 353, 'n_words': 70}