Self-Hosting Perl Modules, part 2 : Mojo::Darkpan
Contents
Install
cpanm Mojo::Darkpan
Run w/o Config
darkpan
# if you want a config file
# darkpan --config config.json
This is now running on port 3000.
There is no authentication on this. See Mojolicious::Plugin::BasicAuthPlus to configure it.
{
"basic_auth": {
"main": {
"username": "admin",
"password": "admin"
}
}
}
{
"basic_auth": {
"main": {
"path": "passwd"
}
}
}
passwd:
admin:admin
Upload a tarball
curl --data-urlencode module=App-Artifact-Repository-0.1.0.tar.gz --data-urlencode 'author=jtrowe' http://localhost:3000/publish
Returns ‘OK’.
Check in browser
Visiting http://localhost:3000/darkpan/authors/id/J/JT/JTROWE/ shows me my packages uploaded.
Success
This seems to work perfectly fine.