返回排行榜

mojolicious/mojo

Perlmojolicious.org

:sparkles: Mojolicious - Perl real-time web framework

perljsonevent-loopuser-agentweb-serverwebsockethttphtmlmojoliciousmvcweb-frameworkcloud-native
Star 增长趋势
Star
2.7k
Forks
590
周增长
Issues
74
1k2k
2011年2月2016年3月2021年5月2026年7月
README

Mojolicious is a fresh take on Perl web development, based on years of experience developing the Catalyst framework, and utilizing the latest web standards and technologies. You can get started with your project quickly, with a framework that grows with your needs.

The Mojo stack provides a consistent set of components that can be used in any project. The guides cover most aspects of using the framework and the components have comprehensive reference documentation. Mojolicious is a real-time web framework, which allows a new class of web applications using WebSockets and having long-running requests without blocking.

Join us now, and be a part of a friendly and knowledgeable community of developers!

Features

  • Most popular distribution on CPAN.
  • An amazing real-time web framework, allowing you to easily grow single file prototypes into well-structured MVC web applications.
    • Everything you need to build cloud-native web applications for state of the art container environments.
    • Powerful out of the box with RESTful routes, plugins, commands, Perl-ish templates, content negotiation, session management, form validation, testing framework, static file server, CGI/PSGI detection, first class Unicode support and much more for you to discover.
  • A powerful web development toolkit, that you can use for all kinds of applications, independently of the web framework.
    • Full stack HTTP and WebSocket client/server implementation with IPv6, TLS, SNI, IDNA, HTTP/SOCKS5 proxy, UNIX domain socket, Comet (long polling), Server-Sent Events (SSE), Promises/A+, async/await, keep-alive, connection pooling, timeout, cookie, multipart, and gzip compression support.
    • Built-in non-blocking I/O web server, supporting multiple event loops as well as optional pre-forking and hot deployment, perfect for building highly scalable web services.
    • JSON and HTML/XML parser with CSS selector support.
  • Very clean, portable and object-oriented pure-Perl API with no hidden magic and no requirements besides Perl 5.26.0 (versions as old as 5.16.0 can be used too, but may require additional CPAN modules to be installed)
  • Also available for JavaScript.
  • Fresh code based upon years of experience developing Catalyst, free and open source.
  • Hundreds of 3rd party extensions and high quality spin-off projects like the Minion job queue.

Installation

All you need is a one-liner, it takes less than a minute.

$ curl -L https://cpanmin.us | perl - -M https://cpan.metacpan.org -n Mojolicious

We recommend the use of a Perlbrew environment.

Getting Started

These three lines are a whole web application.

use Mojolicious::Lite;

get '/' => {text => 'I ♥ Mojolicious!'};

app->start;

To run the example with the built-in development web server, just put the code into a file and start it with morbo.

$ morbo hello.pl
Web application available at http://127.0.0.1:3000

Test it with any HTTP client you prefer.

$ curl http://127.0.0.1:3000/
I ♥ Mojolicious!

Duct tape for the HTML5 web

Use all the latest Perl and HTML features in beautiful single file prototypes like this one, and grow them easily into well-structured Model-View-Controller web applications.

use Mojolicious::Lite -signatures;

# Render template "index.html.ep" from the DATA section
get '/' => sub ($c) {
  $c->render(template => 'index');
};

# WebSocket service used by the template to extract the title from a website
websocket '/title' => sub ($c) {
  $c->on(message => sub ($c, $msg) {
    my $title = $c->ua->get($msg)->result->dom->at('title')->text;
    $c->send($title);
  });
};

app->start;
__DATA__

@@ index.html.ep
% my $url = url_for 'title';
<script>
  const ws = new WebSocket('<%= $url->to_abs %>');
  ws.onmessage = function (event) { document.body.innerHTML += event.data };
  ws.onopen    = function (event) { ws.send('https://mojolicious.org') };
</script>

Want to know more?

Take a look at our excellent documentation!

相关仓库
learnbyexample/Command-line-text-processing

:zap: From finding text to search and replace, from sorting to beautifying text and more :art:

Shellcommand-linelinux
10.2k704
HariSekhon/DevOps-Bash-tools

1200+ DevOps Bash Scripts - AWS, GCP, Kubernetes, Docker, CI/CD, APIs, SQL, PostgreSQL, MySQL, Hive, Impala, Kafka, Hadoop, Jenkins, GitHub, GitLab, BitBucket, Azure DevOps, TeamCity, Spotify, MP3, LDAP, Code/Build Linting, pkg mgmt for Linux, Mac, Python, Perl, Ruby, NodeJS, Golang, Advanced dotfiles: .bashrc, .vimrc, .gitconfig, .screenrc, tmux..

ShellMIT Licensebashdocker
linkedin.com/in/HariSekhon
8.3k1.6k
exiftool/exiftool

ExifTool meta information reader/writer

PerlGNU General Public License v3.0exifiptc
exiftool.org
4.9k461
theos/theos

A cross-platform suite of tools for building and deploying software for iOS and other platforms.

MakefileOthertheosios
theos.dev
4.9k1.1k
kaitai-io/kaitai_struct

Kaitai Struct: declarative language to generate binary data parsers in C++ / C# / Go / Java / JavaScript / Lua / Nim / Perl / PHP / Python / Ruby / Rust

Shellreverse-engineeringprotocol-analyser
kaitai.io
4.6k209
imapsync/imapsync

Imapsync is an IMAP transfers tool. The purpose of imapsync is to migrate IMAP accounts or to backup IMAP accounts. IMAP is one of the three current standard protocols to access mailboxes, the two others are POP3 and HTTP with webmails, webmails are often tied to an IMAP server. Upstream website is

ShellOtherimapimaps
imapsync.lamiral.info
4.1k530
rsnapshot/rsnapshot

a tool for backing up your data using rsync (if you want to get help, use https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss)

PerlGNU General Public License v2.0rsnapshotperl
rsnapshot.org
3.7k272
weechat/weechat

The extensible chat client.

CGNU General Public License v3.0chatirc
weechat.org
3.4k358
apache/avro

Apache Avro is a data serialization system.

JavaMavenApache License 2.0csharpruby
avro.apache.org
3.3k1.8k
Difegue/LANraragi

Web application for archival and reading of manga/doujinshi. Lightweight and Docker-ready for NAS/servers.

PerlMIT Licenseperlreader
lrr.tvc-16.science
3k225
jfcoz/postgresqltuner

Simple script to analyse your PostgreSQL database configuration, and give tuning advice

PerlGNU General Public License v3.0postgresqlperl
postgresqltuner.pl
2.7k192
htrgouvea/nipe

An engine to make Tor network your default gateway

PerlOthertoranonymity
heitorgouvea.me
2.4k338