Skip to content

Commit f6f189e

Browse files
committed
init example without llamaindex yet
1 parent 2702324 commit f6f189e

22 files changed

+3285
-1
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# (Required) Example-specific environment variables
2+
3+
TOGETHER_API_KEY=
4+
5+
# (Optional) Restack Cloud - You only need to set these if you are using Restack Cloud
6+
7+
RESTACK_ENGINE_ID=
8+
RESTACK_ENGINE_ADDRESS=
9+
RESTACK_ENGINE_API_KEY=
10+
11+
RESTACK_CLOUD_TOKEN=
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Build stage
2+
FROM node:20-bullseye-slim AS builder
3+
4+
WORKDIR /app
5+
6+
# Install pnpm
7+
RUN npm install -g pnpm
8+
9+
# Copy package files
10+
COPY package*.json ./
11+
12+
# Install dependencies including TypeScript
13+
RUN pnpm install
14+
RUN pnpm add -D typescript
15+
16+
# Copy source code
17+
COPY . .
18+
19+
# Build TypeScript code
20+
RUN pnpm run build
21+
22+
# Production stage
23+
FROM node:20-bullseye-slim
24+
25+
WORKDIR /app
26+
27+
# Install pnpm
28+
RUN npm install -g pnpm
29+
30+
# Copy package files and built code
31+
COPY --from=builder /app/package*.json ./
32+
COPY --from=builder /app/dist ./dist
33+
34+
# Install production dependencies only
35+
RUN pnpm install --prod
36+
37+
EXPOSE 8000
38+
39+
CMD ["node", "dist/server.js"]
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "restack-examples-ts-express",
3+
"version": "0.0.1",
4+
"description": "Basic Express example",
5+
"main": "server.ts",
6+
"scripts": {
7+
"start": "ts-node src/server.ts",
8+
"start.watch": "nodemon src/server.ts",
9+
"dev": "pnpm start.watch",
10+
"build": "tsc --build",
11+
"clean": "rm -rf node_modules",
12+
"docker:build": "docker build -t restack-express .",
13+
"docker:run": "docker run -p 8000:8000 restack-express",
14+
"docker:dev": "pnpm docker:build && pnpm docker:run",
15+
"restack-up": "node restack_up.mjs"
16+
},
17+
"nodemonConfig": {
18+
"execMap": {
19+
"ts": "ts-node"
20+
},
21+
"ext": "ts",
22+
"watch": [
23+
"src"
24+
]
25+
},
26+
"dependencies": {
27+
"@restackio/ai": "^0.0.80",
28+
"@temporalio/workflow": "^1.11.2",
29+
"dotenv": "^16.4.5",
30+
"express": "^4.21.1",
31+
"together-ai": "^0.9.0",
32+
"zod": "^3.23.8",
33+
"zod-to-json-schema": "^3.23.5"
34+
},
35+
"devDependencies": {
36+
"@restackio/restack-sdk-cloud-ts": "^1.0.16",
37+
"@types/express": "^5.0.0",
38+
"@types/node": "^20.16.9",
39+
"ts-node": "^10.9.2"
40+
}
41+
}

0 commit comments

Comments
 (0)