Last active
May 13, 2018 03:44
-
-
Save TaylorAckley/639d975360f076fa89a74d6a219d078d to your computer and use it in GitHub Desktop.
Api Keys Script
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
const ApiKey = require('../../lib/models/api-key.model'); | |
// Bootstrap default AO | |
ApiKey.findOneAndUpdate({ | |
origin: 'https://localhost:4200' | |
}, { | |
$set: { | |
// This is our default allowed origin, typically where your front-end is served from, ie myapp.com. In this case we use Angular's default serve port. | |
origin: 'https://localhost:4200' | |
} | |
}, { | |
upsert: true, | |
setDefaultsOnInsert: true | |
}).catch(err => //handle error); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment