nstfkc / gemi Goto Github PK
View Code? Open in Web Editor NEWBatteries included full-stack MVC web framework
License: MIT License
Batteries included full-stack MVC web framework
License: MIT License
I tried to scaffold the starter project using bunx create-gemi-app
. Got error as follows
D:\GitHub [⏱ 11s]
➜ bunx create-gemi-app
√ Enter project name: ... gemi-bun
Extracting to D:\GitHub/gemi-bun
Downloading template...
ENOENT: No such file or directory
errno: -2
syscall: "open"
path: "D:\GitHub\gemi-bun/package.json"
Bun v1.1.18 (Windows x64)
D:\GitHub [⏱ 27s]
❯ cd .\gemi-bun\
D:\GitHub\gemi-bun
➜ ls
Directory: D:\GitHub\gemi-bun
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 12-07-2024 01:53 AM .gemi
d---- 12-07-2024 09:09 AM app
d---- 12-07-2024 01:53 AM prisma
d---- 12-07-2024 01:53 AM public
D:\GitHub\gemi-bun
export class MessagingController extends DuplexController<Transaction> {
async process(transaction: Transaction): Transaction {
switch (transaction.kind) {
case "created":
return await db.message.create(transaction.payload);
case "updated":
return await db.message.update(transaction.payload);
case "deleted":
return await db.message.delete(transaction.payload);
}
}
async snapshot() {
return await db.message.findMany();
}
}
type Message = {
id: string;
text: string;
createdBy: string; // User id
channelId: string;
reactions: [];
};
type MessageCreated = {
kind: "created";
payload: Message;
};
type MessageUpdated = {
kind: "updated";
payload: Partial<Message>;
};
type MessageDeleted = {
kind: "deleted";
payload: string; // id
};
type Transaction = MessageCreated | MessageUpdated | MessageDeleted;
function Chat({ channelId }) {
const { data, transact } = useDuplexController("/messaging/:channelId", {
channelId,
});
return (
<div>
<Messages messages={data.messages} />
<Input handleSend={(payload) => transact("create", payload)} />
</div>
);
}
dl@dl:~$ bun upgrade
Bun v1.1.18 is out! You're on v1.1.17
[4.63s] Upgraded.
Welcome to Bun v1.1.18!
What's new in Bun v1.1.18:
https://bun.sh/blog/release-notes/bun-v1.1.18
Report any bugs:
https://github.com/oven-sh/bun/issues
Commit log:
https://github.com/oven-sh/bun/compare/bun-v1.1.17...bun-v1.1.18
dl@dl:~$ bunx create-gemi-app
✔ Enter project name: … gemi
Extracting to /home/dl/gemi
Downloading template...
Installing dependencies...
bun install v1.1.18 (5a0b9352)
Resolving dependencies
Resolved, downloaded and extracted [2714]
warn: incorrect peer dependency "[email protected]"
warn: incorrect peer dependency "[email protected]"
warn: incorrect peer dependency "[email protected]"
warn: incorrect peer dependency "[email protected]"
Saved lockfile
+ @types/[email protected]
+ @types/[email protected]
+ @typescript-eslint/eslint-plugin@7.16.0
+ @typescript-eslint/parser@7.16.0
+ @vitejs/[email protected]
+ autoprefixer@10.4.19
+ eslint@8.45.0 (v9.6.0 available)
+ eslint-plugin-react@7.34.3
+ postcss@8.4.39
+ prettier@3.3.2
+ prisma@5.16.2
+ tailwindcss@3.4.4
+ typescript@5.5.3
+ vite@5.3.3
+ vitest@1.6.0 (v2.0.2 available)
+ @libsql/[email protected] (v0.7.0 available)
+ @prisma/[email protected]
+ @prisma/[email protected] (v5.16.2 available)
+ @react-email/components@0.0.19 (v0.0.21 available)
+ gemi@0.4.9
+ react@19.0.0-rc-dfd30974ab-20240613
+ react-dom@19.0.0-rc-dfd30974ab-20240613
+ sharp@0.33.4
695 packages installed [37.29s]
Initialized empty Git repository in /home/dl/gemi/.git/
Happy coding
visit https://github.com/nstfkc/gemi for documentation
run cd `gemi` and run `bun dev` to start the development server
dl@dl:~$ cd gemi
dl@dl:~/gemi$ bun dev
$ gemi dev
Starting dev server...
Server started on http://localhost:5173
bun: command not found: open
7 | class ShellError extends Error {
8 | #output = @undefined;
9 | info;
10 | exitCode;
11 | stdout;
12 | constructor() {
^
ShellError: Failed with exit code 1
info: {
"exitCode": 1,
"stderr": "bun: command not found: open\n",
"stdout": ""
}
at new ShellError (:12:16)
at new ShellPromise (:72:16)
at BunShell (:187:35)
at /home/dl/gemi/node_modules/gemi/dist/bin/index.js:9081:10
note: missing sourcemaps for /home/dl/gemi/node_modules/gemi/dist/bin/index.js
note: consider bundling with '--sourcemap' to get unminified traces
Bun v1.1.18 (Linux x64)
error: script "dev" exited with code 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.