import { DatabiteServer } from "@databite/server";
import { InMemoryAdapter } from "@databite/engine";
import { slack } from "@databite/connectors";
async function main() {
const server = new DatabiteServer({
port: 3001,
engineConfig: {
schedulerAdapter: new InMemoryAdapter(),
minutesBetweenSyncs: 10,
},
});
await server.addIntegration(
slack.createIntegration("Slack Integration", {
clientId: process.env.SLACK_CLIENT_ID!,
clientSecret: process.env.SLACK_CLIENT_SECRET!,
redirectUri: process.env.SLACK_REDIRECT_URI!,
scopes: ["chat:write", "channels:read"],
})
);
await server.start();
}
main().catch(console.error);