Appearance
Migrating from Interval
Forge is currently a drop in replacement for Interval to support customers migrating from a hosted Interval account. We plan to launch new features and improvements shortly after our early access release. Visit our website to request early access!
Interval SDK -> Forge SDK
Migrating from Interval to Forge is as simple as swapping out your imports and API keys over to the forge SDK for hosted customers. For self-hosted customers, swap out the SDK, then follow the instructions for self-hosting your Forge server.
bash
npm i @forgeapp/sdk
bash
pip install forgeapp-sdk
diff
- import { Interval } from '@forgeapp/sdk'
+ import { Forge } from '@forgeapp/sdk'
import { refundOrder } from '../api/order'
- const interval = new Interval({
- apiKey: '<CURRENT_API_KEY>',
- endpoint: 'wss://<INTERVAL_URL>/websocket'
+ const forge = new Forge({
+ apiKey: '<NEW_API_KEY>',
+ endpoint: 'wss://<FORGE_SERVER_URL>/websocket'
actions: {
refundCustomerOrder: async () => {
const orderID = await io.input.text('Order ID')
await refundOrder(orderID)
return 'Success!'
},
},
})
- interval.listen()
+ forge.listen()
diff
- from interval_sdk import Interval
+ from forgeapp_sdk import Forge
from api import refund_order
- interval = Interval(
- api_key="<CURRENT_API_KEY>",
- endpoint="wss://<INTERVAL_URL>/websocket",
+ forge = Forge(
+ api_key="<YOUR_API_KEY>",
+ endpoint="wss://<FORGE_SERVER_URL>/websocket",
)
- @interval.action(name="Refund Customer Order")
+ @forge.action(name="Refund Customer Order")
async def refund_customer_order(io: IO):
order_id = await io.input.text("Order ID")
await refund_order(order_id)
return 'Success!'
That's it! You're now fully migrated over to Forge. If you're a self-hosted customers, follow the next instructions to swap out the server.
Self-hosted customers
Self-hosted customers can take advantage of our Docker image that we have published. After swapping out the SDK, simply swap out the Docker image to use the Forge server.
diff
services:
server:
- image: interval-server:latest
+ image: forgeapp/server:latest
INFO
The Docker image is a built image of the Forge Server. We've made improvements to the deployment process to container platforms that supports Docker. Note - the database initialization step happens at startup to accommodate users who were running interval-server db-init
on startup.
Check out our self-hosting guide for information on how to set up your self-hosted instance.