Skip to content

OrganicPanda/serve

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

serve

A fork of TJ's serve.

This version has an extra option that allows json files to be used as rest endpoints. This readme will only document my changes. For a complete readme please refer upstream.

This is intended for rapid prototyping purposes only. You would be mad to use this on any real project.

Installation

npm install serve-with-mock-rest

Usage

Firstly create a json file that contains an array at the top level. [] is the minimum but you can fill it with existing objects if you wish.

serve --rest

Now you can GET, PUT, PATCH, POST and DELETE to that file as if it were a rest endpoint.

For more information see connect-mock-rest` which is the middleware that provides this functionality.

About

Simple command-line file / directory server built with connect - supports stylus, jade, etc

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%