Introduction
Jitar is a full-stack JavaScript runtime for small to large web applications. It lets you build monolithic applications and run them spread out over multiple servers and web browsers. Jitar takes care of the inner communication, so you don't have to build any API.
Jitar runs on top of Node.js and in any modern web browser. It has strong support for TypeScript. You can use the frameworks you already love at the front- and back-end because it's only a runtime.
More detailed information about how it works and the philosophy behind it can be found in the docs.
client.ts
server.ts
server.segment.json
// Import components like it's a monolith
import { storePerson } from './server';
import { Person } from './Person';
async function createPerson(name: string, age: number)
{
// Use components typesafe with Intellisense support
// and exchange (complex) data objects between them
const person = new Person(name, age);
await storePerson(person);
}
export { createPerson }
// Use any library or framework you want
import { MongoClient as MC } from 'mongodb';
import { Person } from './Person';
async function storePerson(person: Person)
{
const client = await MC.connect(process.env.DB_STRING);
await client.db('my_app')
.collection('people')
.insertOne({ name: person.name, age: person.age });
}
export { storePerson }
/* Split applications with configuration */
{
"server.js": {
"storePerson": {
"access": "public", /* Control access */
"version": "1.0.0" /* Control versions */
},
"deletePerson": {
"access": "public",
"version": "1.0.0"
}
}
}