Railway

Deploy Restapify

Mock REST API powered by Restapify, perfect for testing and development.

Deploy Restapify

πŸš€ Restapify Template

Easily deploy a Restapify mock API to Railway β€” perfect for testing and frontend development when your backend isn't ready yet.


βš™οΈ Getting Started

πŸ”§ Local Development

  1. Install dependencies:
npm install
yarn install
  1. Start the mock server:
npm run start
yarn start
  1. Open your browser:

The dashboard provides a UI to explore and test your mock endpoints.


πŸ“¦ Environment Variables

You can configure the mock server behavior using environment variables via a .env file:

VariableDefaultDescription
PORT6767Port where the server runs locally
PUBLIC_PATHapi/Base path for all mock routes
PUBLIC_URLhttp://localhost:6767Full URL used in logs and dashboard links
OPEN_DASHBOARD_PATHtrue (only if local)Open dashboard in browser when server starts (local only)

Example .env file:

PORT=6767
PUBLIC_PATH=api/
PUBLIC_URL=http://localhost:6767
OPEN_DASHBOARD_PATH=true

In Railway, PUBLIC_URL is set automatically via RAILWAY_PUBLIC_DOMAIN in most setups.


🌐 Example Routes Served

This template includes the following mocked endpoints:

GET    /api/me
GET    /api/posts
GET    /api/users
GET    /api/users/[userid]
POST   /api/users/[userid]
DELETE /api/users/[userid]
GET    /api/users/[userid]/comments

You can modify or extend these by editing the files in the api/ directory.


πŸš€ Deploy to Railway

Once deployed:

  • API: https://your-subdomain.up.railway.app/api/
  • Dashboard: https://your-subdomain.up.railway.app/restapify

πŸ“š Documentation

πŸ“– https://restapify.vercel.app/docs


Template Content

More templates in this category

View Template
caring-vibrancy
Deploy and Host caring-vibrancy with Railway

baleocho
View Template
Flask WebSocket Chat
Single file, realtime multi-user websocket chat using flask-socketio

Clement Ochieng
View Template
NEW
all-star-fashion-template
Deploy and Host all-star-fashion-template with Railway

Mai ThΓ nh Duy An