https://github.com/yoeight/shoes-app
https://github.com/yoeight/shoes-app
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/yoeight/shoes-app
- Owner: YoEight
- License: mit
- Created: 2014-02-15T21:01:16.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-02-15T21:47:41.000Z (over 12 years ago)
- Last Synced: 2025-04-01T21:59:51.863Z (about 1 year ago)
- Language: Haskell
- Size: 148 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
shoes-app
=========
Installation
------------
```
$ cabal sandbox init
$ cabal install --only-dependencies
$ cabal configure
$ cabal install
```
Run
---
```
$ .cabal-sandbox/bin/shoes Development
```
Server is reachable at http://localhost:3000
RESTful API
-----------
```
POST /shoes (lib/Shoes.hs:postNewShoesR)
-- Create a shoes entry using json data supplied as request body
-- { "description": {shoes description :: String}
-- , "color" : {shoes color :: String}
-- , "size" : {shoes size :: String}
-- , "photo" : {shoes photo. Base64 encoded :: String}
-- }
GET /shoes/{shoes-id :: Number} (lib/Shoes.hs:getShoesR)
-- Get a shoe as an HTML page listing the shoe details
-- HTML:
--
--
-- #{shoes description}
-- #{shoes color}
-- #{shoes size}
--
GET /shoes_list (lib/Shoes.hs:getShoesListR)
-- Get a list of shoes as an HTML page with hyperlinks to all available shoes
-- HTML:
-- {shoes id}
-- .
-- .
-- .
```
Database
--------
Server uses a SQLite backend which is automatically created and initialized at first run
Photo directory
---------------
Server uses a directory to store shoes photos. This setting is in config/app.cfg. Make sure that directory
exists before starting Server. (Default photo dir is ./repo/)