Skip to content

@riposte.co/server

@riposte.co/server packages the entire Riposte runtime so you can run the unified email and calendar API anywhere: the Fastify server, admin portal, CLI commands, and helpers for embedding the router inside another Node.js application.【F:product/README.md†L5-L37】

Pick the runtime mode that fits your environment:

Terminal window
npm install @riposte.co/server

Install Riposte as a project dependency, then provide your existing HTTP server to hostServer when Riposte should mount under another router instead of opening its own port.

import express from 'express';
import { createRiposteServer } from '@riposte.co/server';
const app = express();
async function start() {
await createRiposteServer({
hostServer: { instance: app, mountPath: '/riposte' },
initializeWorkspace: false,
});
await riposte.start();
await app.listen(3000);
console.log('Express + Riposte listening on http://localhost:3000/riposte');
}
start();

The npm package exposes several operational commands through npx or your package manager’s bin shim.【F:product/package.json†L8-L15】

CommandPurpose
riposte-initScaffold a workspace with config templates and environment files.
riposte-runStart the Fastify API server and optional admin portal.
riposte-migrateApply pending Drizzle migrations to the configured database.
riposte-provider-testExercise live provider smoke tests end-to-end.
riposte-adminLaunch the embedded admin portal as a standalone service.
riposte-configValidate, diff, and lint your sync.config.json.