play-express-router
v1.4.0
Published
A module to provide out-of-the-box router control like Play Framework, Revel and Rails
Downloads
14
Readme
Express Router
Express router is a module to simplify and organize routes on express applications, ideal for quickly create REST APIs.
Usage
val app = require('express')();
require('play-express-router')(app, 8080, __dirname);
// Your server is up and running at port 8080! =)
Routes example
# This file defines all application routes
# User Routes
GET /users User.all
POST /users User.create
PUT /users/:id User.update
DELETE /users/:id User.delete
App structure
When using this module your app folder structure should be like this:
- app.js
- routes
- controllers/