Skip to content

Commit

Permalink
Enable CORS
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonianb committed Sep 18, 2018
1 parent 92087ed commit 61b567e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const express = require('express')
const cors = require('cors');
const app = express()
const port = 3000
const RippleAPI = require('ripple-lib').RippleAPI
Expand All @@ -8,6 +9,8 @@ const address = process.env['FUNDING_ADDRESS']
const secret = process.env['FUNDING_SECRET']
const amount = process.env['XRP_AMOUNT']

app.use(cors());

app.post('/accounts', (req, res) => {
const api = new RippleAPI({
server: rippledUri
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"cors": "^2.8.4",
"express": "^4.16.3",
"ripple-lib": "^1.0.0"
}
Expand Down

0 comments on commit 61b567e

Please sign in to comment.