This repository has been archived by the owner on Oct 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Robert Newson
committed
Mar 14, 2011
1 parent
921234f
commit 272a952
Showing
1 changed file
with
8 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,15 @@ | ||
Project Skeleton for the monic app. | ||
Creating containers; | ||
|
||
You should find in this directory: | ||
curl -sv localhost:8000/foo -XPUT -Hcontent-type:application/vnd.com.cloudant.monic.container+json | ||
|
||
README : this file | ||
Makefile : simple make commands | ||
rebar : the Rebar build tool for Erlang applications | ||
rebar.config : configuration for Rebar | ||
start.sh : simple startup script for running monic | ||
/ebin | ||
/monic.app : the Erlang app specification | ||
/src | ||
/monic_app.erl : base module for the Erlang application | ||
/monic_sup.erl : OTP supervisor for the application | ||
/monic_resource.erl : a simple example Webmachine resource | ||
/priv | ||
/dispatch.conf : the Webmachine URL-dispatching table | ||
/www : a convenient place to put your static web content | ||
Deleting containers; | ||
|
||
You probably want to do one of a couple of things at this point: | ||
curl -sv localhost:8000/foo -XDELETE -Hcontent-type:application/vnd.com.cloudant.monic.container+json | ||
|
||
0. Build the skeleton application: | ||
$ make | ||
- or - | ||
$ ./rebar compile | ||
Inserting data into containers | ||
|
||
1. Start up the skeleton application: | ||
$ ./start.sh | ||
curl -sv localhost:8000/foo/1234/foo.jpg -T foo.jpg | ||
|
||
2. Change the basic application: | ||
edit src/monic_resource.erl | ||
Fetching data from containers | ||
|
||
3. Add some new resources: | ||
edit src/YOUR_NEW_RESOURCE.erl | ||
edit priv/dispatch.conf | ||
curl localhost:8000/foo/1234/foo.jpg |