Phcscriptcdnpro::Engine.routes.draw do # CDN Frontend get 'frontend/cdnpages/list', :path => "script-cdn" # Script CDN Listing System namespace :scriptcdn do # Main Script Module resources :mains do resources :authors resources :urls resources :versions resources :informations end end # Application API namespace :api, :path => "", :constraints => {:subdomain => "api"} do # Routes for API resources :mains, defaults: {format: 'json'} resources :informations, defaults: {format: 'json'} resources :versions, defaults: {format: 'json'} end end