https://github.com/gutenye/guten
https://github.com/gutenye/guten
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/gutenye/guten
- Owner: gutenye
- Created: 2016-08-17T11:02:38.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-09-21T07:03:59.000Z (over 8 years ago)
- Last Synced: 2025-02-15T00:45:04.171Z (4 months ago)
- Language: JavaScript
- Size: 172 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Overview
---------Modeling
--------```
Todo id title active
```Setup
-----For Relay
1. cd relay
2. ./ake mount # because relay use babel 5.x version, so can't symlink ../common . which use ../node_modules
3. ./ake
4. goto localhost:3001For the Rest
1. ./ake
2. goto localhost:3000```
ROOT/
common/
database.js
schema.js # GraphQL API
store.js todo.js todos.js # REST API
react/
relay/
polymer/
angular/
```REST API
```
Todos.find("todo").then(todos => {
todos.create(props)
todos.delete(record)
todos.activeCount
todos.toggleAllCompleted(true)
...
})var todo = new Todo({title: "hello"}) Todo.create({})->Promise
todo.completed = true
todo.save()
todo.delete()store.find("todo"), ("todo", query), ("todo", id)
store.create("todo", props)
store.update(record)
store.delete(record)
```GraphQL API
```
`query {
todos {
id
title
completed
}
}`var todos = new Todos(data)
...
```