Minimal starter to render Remotion videos via an Express server and deploy on Railway.
- Install:
npm install - Dev server:
npm run dev - Remotion Studio:
npm run remotion:studio - Production:
npm start
- POST
/renders: Start a render. Body:{ quizData: { questions: [{ question, options, correctAnswerIndex }] }, chatId?: string } - GET
/renders/:id: Status of a render - DELETE
/renders/:id: Cancel a render
Example:
curl -X POST https://<your-app>.railway.app/renders \
-H 'Content-Type: application/json' \
-d '{
"quizData": {
"questions": [
{"question":"Sample question?","options":["A","B","C","D"],"correctAnswerIndex":0}
]
}
}'- Create a new project on Railway and connect this repository
- Default start command uses
PORTenv, no extra config needed - Optional envs:
- REMOTION_SERVE_URL: Use a pre-bundled Remotion serve URL
- TELEGRAM_BOT_TOKEN: If set and you send a
chatId, the server will attempt to send the finished video via Telegram
- Default composition is
QuizVideo(vertical 1080x1920). It shows a simple intro and placeholder questions. - Assets live in
public/and are referenced usingstaticFile(...). - To customize the video, edit files under
remotion/(for exampleremotion/QuizVideo.tsx).
- Render locally:
npx remotion render - Upgrade Remotion:
npx remotion upgrade
Docs: Remotion Fundamentals