2 # Copyright (C) 2015-2018 all contributors <meta@public-inbox.org>
3 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
5 # Standalone NNTP server for public-inbox.
8 require PublicInbox::Daemon;
9 require PublicInbox::NNTP;
10 require PublicInbox::NNTPD;
11 my $nntpd = PublicInbox::NNTPD->new;
12 PublicInbox::Daemon::run('0.0.0.0:119',
13 sub { $nntpd->refresh_groups }, # refresh
14 sub ($$$) { PublicInbox::NNTP->new($_[0], $nntpd) }, # post_accept