Skip to content

Instantly share code, notes, and snippets.

View Anuragpatel10's full-sized avatar
🏠
Working from home

Anurag Patel Anuragpatel10

🏠
Working from home
View GitHub Profile
@Anuragpatel10
Anuragpatel10 / database.rules.json
Created May 31, 2019 20:01 — forked from codediodeio/database.rules.json
Common Database Rules for Firebase
// No Security
{
"rules": {
".read": true,
".write": true
}
}
@Anuragpatel10
Anuragpatel10 / KeystoneApiExample.md
Created August 29, 2016 13:09 — forked from JedWatson/KeystoneApiExample.md
Example of how to scaffold API endpoints for Posts in a Keystone project (based on the yo keystone example).

This is an example of how to scaffold API endpoints to list / get / create / update / delete Posts in a Keystone website.

It's a modification of the default project created with the yo keystone generator (see https://github.com/JedWatson/generator-keystone)

Gists don't let you specify full paths, so in the project structure the files would be:

routes-index.js        -->    /routes/index.js         // modified to add the api endpoints
routes-api-posts.js    -->    /routes/api/posts.js     // new file containing the Post API route controllers