Skip to content

Instantly share code, notes, and snippets.

@abruzzi
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abruzzi/9172100 to your computer and use it in GitHub Desktop.
Save abruzzi/9172100 to your computer and use it in GitHub Desktop.
Project using moko and nginx
[
{
"mount": {
"dir": "./",
"uri": "/"
}
},
{
"request": {
"method": "post",
"uri": "/action.do",
"json_paths": {
"$.type": "events"
}
},
"response": {
"status": 200,
"file": "spec/fixtures/events.json"
}
},
{
"request": {
"method": "post",
"uri": "/action.do",
"json_paths": {
"$.type": "contacts"
}
},
"response": {
"status": 200,
"file": "spec/fixtures/contacts.json"
}
}
]
➜  todos git:(master) tree
.
├── Gemfile
├── Gemfile.lock
├── README.md
├── TODO
├── conf
│   ├── database.yml
│   └── moko.conf.json
├── css
│   └── style.css
├── index.html
├── karma.conf.js
├── moko.up
├── package.json
├── resources
│   └── todos.json
├── run.sh
├── scripts
│   ├── app.js
│   ├── jquery-todoify.js
│   └── lib
│       ├── jasmine-jquery.js
│       ├── jquery-1.10.2.js
│       └── underscore-1.5.1.min.js
├── spec
│   ├── fixtures
│   │   └── templ.html
│   ├── helper
│   │   └── helper.js
│   └── views
│       ├── todo-with-fixutre-spec.js
│       └── todo-with-server-spec.js
└── test.html
upstream moco_server {
server localhost:12306;
}
server {
listen 9999;
server_name _;
location / {
proxy_pass http://moco_server;
index index.html;
}
location ~ ^/(scripts/|css/|style/) {
root "/Users/twer/develop/design/todos/";
}
location = /index.html {
root "/Users/twer/develop/design/todos";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment