Skip to content

Commit

Permalink
Fixed marklogic-community#31: moved bodyparsing to allow upload of no…
Browse files Browse the repository at this point in the history
…n-json
  • Loading branch information
grtjn committed Sep 16, 2015
1 parent c5780cc commit 734718b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/templates/node-server/node-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ app.use(expressSession({

app.use(cookieParser());
app.use(bodyParser.urlencoded({extended: true}));
app.use(bodyParser.json());
app.use(logger('dev'));

app.use('/api', require('./routes'));

app.use('/v1', require('./proxy'));

// [GJo] (#31) Moved this till after /v1 proxying, otherwise it might try to parse uploaded binaries as json..
app.use(bodyParser.json());

app.use('/api', require('./routes'));

app.use('/create', express.static('./build/index.html'));
app.use('/profile', express.static('./build/index.html'));

Expand Down

0 comments on commit 734718b

Please sign in to comment.