This file contains hidden or 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
| #!/bin/bash | |
| # --api: flag to create an api only rails app | |
| # --skip-active-record: Removes active record support | |
| # --skip-sprockets: Removes Asset compilation support http://guides.rubyonrails.org/asset_pipeline.html | |
| rails new api-example --api --skip-active-record --skip-sprockets |
This file contains hidden or 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
| function handleError (res, message) { | |
| return function (error) { | |
| res.json(`${message} ${JSON.stringify(error)}`); | |
| } | |
| }; |
This file contains hidden or 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
| function get(req, res) { | |
| var Foo, | |
| query, | |
| foos; | |
| Foo = Parse.Object.extend("Foo", {}, {}); | |
| query = new Parse.Query(Foo); | |
| foos = []; |
This file contains hidden or 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
| var cors = require('cloud/lib/cors.js'); | |
| app.use(cors()); | |
| app.options('*', cors()); |
This file contains hidden or 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
| var vary = require(‘cloud/lib/vary.js’); |
This file contains hidden or 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
| var vary = require(‘vary’); |
NewerOlder