Code Snippet Card

greet.ts
export function greet(name: string) {
return `Hello, ${name}!`;
}
 
console.log(greet("Beste"));
About this piece

Code Snippet Card

Dark editor card with three traffic-light dots, a filename tab, and line-numbered code.

Usage

The import and the props worth knowing about, in one place.

import { Code2 } from "@/components/beste/piece/code2";

<Code2
  title="greet.ts"
  lines={[
    "export function greet(name: string) {",
    "  return `Hello, ${name}!`;",
    "}",
    "",
    "console.log(greet(\"Beste\"));"
  ]}
  bordered={false}
/>

More Code pieces

View all Code
members.ts
import { Sirius } from '@sirius/sdk'
const client = new Sirius(apiKey)
await client.members.create({ name })
function greet(name) {
return 'Hi ' + name;
return `Hello, ${name}!`;
}
const greeting = "Hello, Beste!";ts
{
"name":"Beste",
"active":true,
"count":42
}
const user = await fetchUser("42");
# Database
DATABASE_URL=postgres://localhost/beste
REDIS_URL=redis://localhost:6379
PORT=3000