Skip to content

Commit

Permalink
fix: warning about body-parser
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorybesson committed Jul 16, 2017
1 parent d91ffcb commit 5820a04
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/cli/core/manager/Manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import watch from 'watch'
import express from 'express'
import bodyParser from 'body-parser'
import tinylr from 'tiny-lr'
import clc from 'cli-color'
import {
coreUtils,
cmsData,
Expand Down Expand Up @@ -95,11 +96,22 @@ class Manager {

// Launching a Livereload server
this.lserver
.use(bodyParser())
.use(bodyParser.json())
.use(bodyParser.urlencoded({extended: true}))
.use(tinylr.middleware({ app: this.lserver }))
.listen(lport, function() {
console.log('Livereload listening on %d', lport)
})
.on('error', function(err) {
if(err.code == 'EADDRINUSE'){
console.error(
clc.red('can\'t start the Abe\'s watch server\n'),
'This watch server has tried to listen on the port ' + lport + ' but this server is already in use by another process... '
)
} else {
console.error(err)
}
})

// sync assets from templates to /site
cmsTemplates.assets.copy()
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/data/data1.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ describe('Abe', function() {
.useXpath()
.url('http://localhost:3003/abe/editor/autocomplete.html')
// colors single
.pause(1000)
.click('//*[@id="colors.single"]/option[3]')
.pause(1000)
.assert.containsText('//*[@id="colors.single"]', "vert")
Expand Down

0 comments on commit 5820a04

Please sign in to comment.