---
title: "Deploy Simple ExpressJS Template"
description: "Express template with examples for middleware & separated routers"
category: "Starters"
url: https://railway.com/deploy/Q4mMOs
---

# Deploy Simple ExpressJS Template

Express template with examples for middleware & separated routers

**[Deploy Simple ExpressJS Template on Railway](https://railway.com/template/Q4mMOs)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/Q4mMOs/manifest.json

- **Creator:** Personal
- **Category:** Starters
- **Total deploys:** 139

## Template content

### express

- **Source:** https://github.com/alexng353/railway-expressjs-template

## Documentation

This expressjs template is a good starter for anyone. It comes pre-built with good examples for middleware, logging and code-splitting into multiple .js files using express's router object. Comes with thorough documentation in the form of comments that explains what everything in the app does. Have fun with this example and thanks for choosing mine!

Check out src/index.js for some good info about how to start out with express, then checkout src/routes/router_example.js to see how you can make your code neat and tidy by splitting it into multiple files.

Routes:
GET "/": returns a nice welcome message
GET "/json": returns json welcome message
POST "/post": returns a welcome message and any body you pass through the post request
GET "/example/router": example nested router spawned in a separate file. Returns a help message.

Files:
- `src` contains the source code for the server
- `src/routes` contains the routes for the server
- `src/routes/router_example.js` contains examples pertaining to expressjs routers


## Similar templates

- [Openfront Gym](https://railway.com/deploy/openfront-gym) — Opensource Mindbody alternative based on Next.js and Keystone.js
- [open-excalidraw](https://railway.com/deploy/open-excalidraw) — Self-hostable collaborative drawing built on Excalidraw
- [Next.js + Prisma + PostgreSQL Starter](https://railway.com/deploy/nextjs-prisma-postgres) — Deploy a Next.js app with Prisma ORM and PostgreSQL in one click.

Open this page in a browser: https://railway.com/deploy/Q4mMOs
