All Projects → mojolicious → mojo.js

mojolicious / mojo.js

Licence: MIT license
🦄 The Mojolicious real-time web framework for Node.js

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to mojo.js

Lux
Build scalable, Node.js-powered REST JSON APIs with almost no code.
Stars: ✭ 556 (+283.45%)
Mutual labels:  mvc, backend
Butterfly
🔥 蝴蝶--【简单】【稳定】【好用】的 Python web 框架🦋 除 Python 2.7,无其他依赖; 🦋 butterfly 是一个 RPC 风格 web 框架,同时也是微服务框架,自带消息队列通信机制实现分布式
Stars: ✭ 82 (-43.45%)
Mutual labels:  mvc, web-framework
Actframework
An easy to use Java MVC server stack
Stars: ✭ 690 (+375.86%)
Mutual labels:  mvc, web-framework
multi-projects-architecture-with-Ktor
A Ktor real world example built on multi-projects architecture
Stars: ✭ 29 (-80%)
Mutual labels:  backend, web-framework
Thinkgo
A lightweight MVC framework written in Go (Golang).
Stars: ✭ 184 (+26.9%)
Mutual labels:  mvc, web-framework
Iris
The fastest HTTP/2 Go Web Framework. AWS Lambda, gRPC, MVC, Unique Router, Websockets, Sessions, Test suite, Dependency Injection and more. A true successor of expressjs and laravel | 谢谢 https://github.com/kataras/iris/issues/1329 |
Stars: ✭ 21,587 (+14787.59%)
Mutual labels:  mvc, web-framework
Bancha
Bancha is an open-source CMS made by Nicholas Valbusa written in PHP5.3.
Stars: ✭ 76 (-47.59%)
Mutual labels:  mvc, backend
Graphqlws
Implementation of the GraphQL over WebSocket protocol in Go.
Stars: ✭ 139 (-4.14%)
Mutual labels:  backend, websockets
Proteus
Lean, mean, and incredibly fast JVM framework for web and microservice development.
Stars: ✭ 178 (+22.76%)
Mutual labels:  mvc, web-framework
Denovel
A Deno Framework For Web Artisan - Inspired by Laravel
Stars: ✭ 128 (-11.72%)
Mutual labels:  mvc, web-framework
Saea
SAEA.Socket is a high-performance IOCP framework TCP based on dotnet standard 2.0; Src contains its application test scenarios, such as websocket,rpc, redis driver, MVC WebAPI, lightweight message server, ultra large file transmission, etc. SAEA.Socket是一个高性能IOCP框架的 TCP,基于dotnet standard 2.0;Src中含有其应用测试场景,例如websocket、rpc、redis驱动、MVC WebAPI、轻量级消息服务器、超大文件传输等
Stars: ✭ 318 (+119.31%)
Mutual labels:  mvc, websockets
Simplify.Web
Moved to https://github.com/SimplifyNet. Simplify.Web is a lightweight and fast server-side .NET web-framework based on MVC and OWIN for building HTTP based web-applications, RESTful APIs etc.
Stars: ✭ 23 (-84.14%)
Mutual labels:  mvc, web-framework
Hunt Framework
A Web framework for D Programming Language. Full-stack high-performance.
Stars: ✭ 256 (+76.55%)
Mutual labels:  mvc, web-framework
Saturn
Opinionated, web development framework for F# which implements the server-side, functional MVC pattern
Stars: ✭ 540 (+272.41%)
Mutual labels:  mvc, backend
cart
Simple Symfony 4 shopping cart application. App boilerplate
Stars: ✭ 18 (-87.59%)
Mutual labels:  mvc, backend
Cakephp
CakePHP: The Rapid Development Framework for PHP - Official Repository
Stars: ✭ 8,453 (+5729.66%)
Mutual labels:  mvc, web-framework
Blaze
⚡ File sharing progressive web app built using WebTorrent and WebSockets
Stars: ✭ 991 (+583.45%)
Mutual labels:  backend, websockets
Kuzzle
Open-source Back-end, self-hostable & ready to use - Real-time, storage, advanced search - Web, Apps, Mobile, IoT -
Stars: ✭ 991 (+583.45%)
Mutual labels:  backend, websockets
Jkmvc
Jkmvc is an elegant, powerful and lightweight MVC & ORM framework built using kotlin. It aims to be swift, secure, and small. It will turn java's heavy development into kotlin's simple pleasure. No spring.
Stars: ✭ 86 (-40.69%)
Mutual labels:  mvc, web-framework
Mojo
✨ Mojolicious - Perl real-time web framework
Stars: ✭ 2,298 (+1484.83%)
Mutual labels:  mvc, web-framework

npm

The Mojolicious real-time web framework for Node.js. Written in TypeScript. Meticulously designed for hypermedia-driven backend web services using all the latest JavaScript features.

If you want to stay up to date on the latest developments join us on Matrix or IRC.

Features

  • A real-time web framework, allowing you to easily grow single file prototypes into well-structured MVC web applications.

    • Powerful out of the box with RESTful routes, WebSockets, plugins, commands, logging, templates, content negotiation, session management, form and JSON validation, testing framework, static file server, cluster mode, CGI 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.

    • High performance HTTP and WebSocket client/server implementation with support for HTTPS/WSS, cookies, redirects, urlencoded/multi-part forms, file uploads, JSON/YAML, HTML/XML, mocking, API testing, HTTP/SOCKS proxies, and gzip compression.
    • HTML/XML parser with CSS selector support.
  • Very clean, class and async/await based API, written in TypeScript, with very few requirements to avoid NPM dependency hell and allow for "Perl-grade" long term support.

  • Fresh code based upon decades of experience developing Mojolicious and Catalyst, free and open source.

Installation

All you need is Node.js 16.0.0 (or newer).

$ npm install @mojojs/core

Maybe take a look at our high quality spin-off projects @mojojs/dom, @mojojs/template and @mojojs/path.

Getting Started

These four lines are a whole web application.

import mojo from '@mojojs/core';

const app = mojo();

app.get('/', ctx => ctx.render({text: 'I ♥ Mojo!'}));

app.start();

Use the built-in command system to start your web server.

$ node index.mjs server
[77264] 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 ♥ Mojo!

Duct Tape for the Web

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

import mojo from '@mojojs/core';

const app = mojo();

app.get('/', async ctx => {
  await ctx.render({inline: inlineTemplate});
});

app.websocket('/title', ctx => {
  ctx.plain(async ws => {
    for await (const url of ws) {
      const res   = await ctx.ua.get(url);
      const html  = await res.html();
      const title = html.at('title').text();
      ws.send(title);
    }
  });
});

app.start();

const inlineTemplate = `
<script>
  const ws = new WebSocket('<%= ctx.urlFor('title') %>');
  ws.onmessage = event => { document.body.innerHTML += event.data };
  ws.onopen    = event => { ws.send('https://mojolicious.org') };
</script>
`;

Want to know more?

Take a look at our documentation!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].