Skip to content

Simple code outlining how to connect to ibm cloudant db via angular js

Notifications You must be signed in to change notification settings

gweennnnn/cloudantangularconnect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

cloudantangularconnect

Created this after searching endlessly for a code simply outlining how to connect to ibm cloudant db via angular js, without the fluff.

To use this code, you need to first enable CORS for your cloudant account.

First go to cloudant.com and login. Go to > Account > CORS. Ensure "Enable Cors" is selected. Click on restrict to specific domains and add in the URL you're going to access it from (Or take the lazy route and just select all domains-- but this isn't secure!)

Now download the code and replace the values for the const variables in connect.js with your login details. To get an API key, go to cloudant.com > Databases > YOUR_DATABASE > Permissions > Generate API Key This will give you a set of api connection keys. Ensure that "Reader" is selected for it, else you wont be able to read any data!

Enjoy!

About

Simple code outlining how to connect to ibm cloudant db via angular js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published