Call your server functions directly. Jitar takes care of the rest.
import sayHello from './sayHello';
const message = await sayHello('Jitar');
console.log(message); // Hello Jitar!
async function sayHello(name: string) {
return `Hello ${name}!`;
}
export default sayHello;
Developers are at the heart of every application. Jitar makes your life easier and more productive.
API automation
Automates all client-server communication.
E2E type-safety
Reduces programming and refactoring errors.
Configuration only
Keeping the code clean, simple and focussed.
E2E Intellisense
Speeds up developing full-stack apps.
Platform agnostic
Runs in modern web browsers and on the server.
Framework agnostic
Works with every frontend and backend framework.
Getting started with Jitar is as easy as pie. It only takes a few simple steps.
Create new project
Start fast with our creator and pick one of our templates for Vue, React, SolidJS, LIT, Svelte or Jitar only.
npm create jitar@latest -- --template react
Add your functions
Write functions and export them like you are used to. Just make sure they are async.
Import and call your functions like they're on the same side.
Note that all types are checked and autocomplete is fully available.
async function sum(...numbers: number[]) { /* … */ }
export default sum;
import sum from './sum';
const result = await sum(2, 3);
Configure what runs on the server
Add the exported functions to a server segment configuration file.
Don't forget to make them public, otherwise they can't be accessed!
{
"./shared/sum": {
"default": { "access": "public" }
}
}
Run your application
Jitar will create an RPC endpoint for each public function that will be used by any client that calls a function automatically.
You can also call the function yourself with any HTTP client using the RPC API. Easy, right?
> npm run standalone
[INFO] Server started at http://127.0.0.1:3000
[INFO] RPC procedures: [
'shared/sum'
]
[INFO] Ran request: shared/sum