Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/claviz/drayman
Server-side component framework.
https://github.com/claviz/drayman
drayman framework nodejs typescript
Last synced: 3 months ago
JSON representation
Server-side component framework.
- Host: GitHub
- URL: https://github.com/claviz/drayman
- Owner: Claviz
- License: mit
- Created: 2021-04-22T06:37:57.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-10T12:47:57.000Z (10 months ago)
- Last Synced: 2024-08-08T21:19:59.139Z (6 months ago)
- Topics: drayman, framework, nodejs, typescript
- Language: TypeScript
- Homepage: https://drayman.io
- Size: 30.2 MB
- Stars: 76
- Watchers: 6
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Drayman
Drayman is a server-side component framework.
[Docs](https://drayman.io) · [Blog](https://drayman.io/blog) · [Changelog](https://github.com/Claviz/drayman/releases) · [Join Discord](https://discord.gg/5GYZTvUSxV) · [X](https://x.com/draymanio)
![Version](https://img.shields.io/github/v/release/claviz/drayman)
![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/claviz/drayman/config.yml)## ✨ Features
- Drayman is designed to be easily installed and used to get your website up and running quickly.
- Use any available HTML element, web component or custom Drayman third-party component together with server-side code in single script.
- With Drayman, browser only renders what user should see - all logic and calculations happen server-side.## 📸 Snapshot
Do you want to create a web application that, for example, allows the user to select a file from the file system and view it's contents? With Drayman it would be a single script:
```tsx
import { promises as fs } from "fs";export const component: DraymanComponent = async ({ forceUpdate }) => {
const files = (await fs.readdir("./")).filter((x) => x.includes("."));
let selectedFile;return async () => {
return (
<>
Select a file to view it directly from file system
{
selectedFile = value;
await forceUpdate();
}}
>
{files.map((fileName) => (
{fileName}
))}
{selectedFile &&{await fs.readFile(selectedFile, "utf-8")}}
>
);
};
};
```