KO
|
EN
gitlite — search
Search
#python
#javascript
#typescript
#ai
#automation
#web-development
#nodejs
#rust
#cli
#gemini
#swift
#react
hello-falcor
★ 22
Open GitHub ↗
A simple faclor.js example.
Download README (.md)
Explore Similar Repositories
falcor-express
:
Express Middleware for Hosting Falcor Data Sources.
falcor-http-datasource
:
A DataSource for Falcor that can be use to retrieve JSON Graph data from an HTTP server.
falcor-json-graph
:
A set of factory functions for creating JSON Graph values
falcor-hapi
:
Falcor middleware for Hapi app server
falcor2
:
No description available.
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
hello-falcor
?
Download (.md)
# hello-faclor > A simple [faclor.js](https://netflix.github.io/falcor/) example. This example uses handlebars and some falcor magic to list JS books. Do check the [demo](http://hello-falcor.herokuapp.com/)! __Heart of the Server:__ ```js app.use('/library.json', falcorExpress.dataSourceRoute(function (req, res) { return new Router([ { route: "books.list", get: function() { return {path:["books"], value: JSON.stringify(Library) }; } }, { route: "books.names", get: function() { return {path:["books","names"], value: Library.map( book => book.name )}; } } ]); })); ``` __Heart of the client:__ ```js var model = new falcor.Model({source: new falcor.HttpDataSource('/books.json') }); model. get("books"). then(function(response) { var books = JSON.parse(response.json.books); }); ``` ## License MIT © [Hemanth.HM](http://h3manth.com)