Skip to content

Commit

Permalink
Remove CORS
Browse files Browse the repository at this point in the history
  • Loading branch information
gpoitch committed Sep 13, 2014
1 parent aca842a commit 3c084ce
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ A modern, minimalist WYSIWYG editor.
2. Build: `gulp build`

## Playing
1. Start the server: `npm start`
2. Navigate to the demo at [http://localhost:5000]
1. Build
2. For image uploading and embedding, enter your credentials in `server/config.json`
3. Start the server: `npm start`
4. Navigate to the demo at [http://localhost:5000](http://localhost:5000)

## Testing
`gulp test`
Expand All @@ -22,4 +24,5 @@ A modern, minimalist WYSIWYG editor.
- `gulp watch` to auto build/test as you save files
- Running the server is only necessary if you want image uploads and embeds. You can just open demo/index.html


---
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"dependencies": {
"aws-sdk": "^2.0.17",
"busboy": "^0.2.8",
"cors": "^2.4.1",
"embedly": "^1.0.2",
"express": "^4.9.0"
},
Expand Down
13 changes: 5 additions & 8 deletions server/config.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
{
"aws" : {
"accessKeyId" : "XXXXXX",
"accessKeyId" : "XXXXXX",
"secretAccessKey" : "XXXXXX",
"region" : "us-east-1"
"region" : "us-east-1"
},
"s3" : {
"bucketName" : "XXXXXX",
"maxFileSize" : 5000000
"bucketName" : "XXXXXX",
"maxFileSize" : 5000000
},
"embedlyKey" : "XXXXXX",
"cors" : {
"origin" : "*"
}
"embedlyKey" : "XXXXXX"
}
2 changes: 0 additions & 2 deletions server/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
var express = require('express');
var cors = require('cors');
var config = require('./config');
var S3UploadService = require('./services/s3-uploader');
var EmbedService = require('./services/embed');

// Express app
var app = express();
app.use(cors(config.cors));

// Demo setup
app.use(express.static('demo'));
Expand Down

0 comments on commit 3c084ce

Please sign in to comment.