Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions server/bin/www-dev
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@ import { spawn } from "child_process";
import { fileURLToPath } from "url";
import { dirname, resolve } from "path";
import fs from "fs";
import { config } from "dotenv";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

config({
path: resolve(__dirname, "..", "..", ".env"),
});

console.log("Starting dev server...");
const env = process.env.NODE_ENV || "development";

Expand Down
3 changes: 2 additions & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
"@ai16z/eliza": "0.1.5-alpha.3",
"@ai16z/plugin-bootstrap": "0.1.5-alpha.3",
"@grammyjs/conversations": "^1.2.0",
"@nevermined-io/payments": "^0.8.1",
"@ngrok/ngrok": "^1.4.1",
"@solana/web3.js": "^1.98.0",
"agent-twitter-client": "^0.0.18",
"@useorbis/db-sdk": "0.0.60-alpha",
"agent-twitter-client": "^0.0.18",
"axios": "^1.7.7",
"better-sqlite3": "^11.6.0",
"cookie-parser": "^1.4.7",
Expand Down
7 changes: 7 additions & 0 deletions server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import cookieParser from "cookie-parser";
import githubRouter from "./routes/github.js";
import { AnyType } from "./utils.js";
import { isHttpError } from "http-errors";
import { NeverminedService } from "./services/nevermined.service.js";

// Convert ESM module URL to filesystem path
const __filename = fileURLToPath(import.meta.url);
Expand Down Expand Up @@ -100,6 +101,12 @@ app.listen(port, async () => {

const botInfo = await telegramService.getBotInfo();
console.log("Telegram Bot URL:", `https://t.me/${botInfo.username}`);

if (process.env.NEVERMINED_API_KEY) {
const neverminedService = await NeverminedService.getInstance();
await neverminedService.start();
services.push(neverminedService);
}
} catch (e) {
console.error("Failed to start server:", e);
process.exit(1);
Expand Down
Loading